From 500f444d23a7a758da229ebe6b9691cc5d4fe731 Mon Sep 17 00:00:00 2001 From: SphinxKnight Date: Wed, 16 Mar 2022 17:52:18 +0100 Subject: Fix #4269 - Removes empty/special characters (#4270) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove ufeff * Remove u2064 * Remove u2062 * Replace u202f followed by : with  : * Replace u202f next to « or » with   and « or » * Replace u202f followed by ; with  ; * Replace u202f followed by ! with   * Replace u202f followed by ? with  ? * Replace remaining u202f with classical space * Replace u200b surrounded by space with classical space * Replace u200b surrounded by space with classical space - again (repeated) * Remove remaining u200b * Remove u200a * Replace u2009 with   * Remove u00ad * Replace u00a0 followed by : ! or ? with   and punctuation * Replace u00a0 surrounded « or » with   and punctuation * Replace u00a0 followed by whitespaces * Replace u00a0 preceded by whitespaces * Replace u00a0 followed by a newline with a newline * Replace u00a0 followed by a newline with a newline - Take2 * Replace u00a0 followed by a ;   and punctuation * Remove u00a0 followed by , * Remove u00a0 in indentation spaces with \n([ ]*)([\u00a0])([ ]*) * Manual replacement of ([\u00a0])([ ]+) * Replace remaining ([\u00a0]+) by a space * cleaning empty elements * remove ufe0f * Remove u00a0 and u202f after merging against updated main * remove double whitespace using (\w)( )(\w) --- .../api/analysernode/getbytefrequencydata/index.md | 34 +++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'files/fr/web/api/analysernode/getbytefrequencydata') diff --git a/files/fr/web/api/analysernode/getbytefrequencydata/index.md b/files/fr/web/api/analysernode/getbytefrequencydata/index.md index 13b054ee57..a41964d7fd 100644 --- a/files/fr/web/api/analysernode/getbytefrequencydata/index.md +++ b/files/fr/web/api/analysernode/getbytefrequencydata/index.md @@ -28,7 +28,7 @@ Un {{domxref("Uint8Array")}}. ## Exemple -L'exemple suivant montre comment créer simplement un  `AnalyserNode` avec [`AudioContext`](/fr/docs/Web/API/AudioContext), puis utiliser  [`requestAnimationFrame`](/fr/docs/Web/API/Window/requestAnimationFrame) et [``](/fr/docs/Web/HTML/Element/canvas) pour collecter les données temporelles et dessiner un oscilloscope en sortie. Pour des exemples plus complets, voir notre démo [Voice-change-O-matic](http://mdn.github.io/voice-change-o-matic/)  (et en particulier [app.js lines 128–205](https://github.com/mdn/voice-change-o-matic/blob/gh-pages/scripts/app.js#L128-L205)). +L'exemple suivant montre comment créer simplement un `AnalyserNode` avec [`AudioContext`](/fr/docs/Web/API/AudioContext), puis utiliser [`requestAnimationFrame`](/fr/docs/Web/API/Window/requestAnimationFrame) et [``](/fr/docs/Web/HTML/Element/canvas) pour collecter les données temporelles et dessiner un oscilloscope en sortie. Pour des exemples plus complets, voir notre démo [Voice-change-O-matic](http://mdn.github.io/voice-change-o-matic/) (et en particulier [app.js lines 128–205](https://github.com/mdn/voice-change-o-matic/blob/gh-pages/scripts/app.js#L128-L205)). ```js var contexteAudio = new (window.AudioContext || window.webkitAudioContext)(); @@ -44,25 +44,25 @@ var tableauDonnees = new Uint8Array(tailleMemoireTampon); contexteCanvas.clearRect(0, 0, LARGEUR, HAUTEUR); function dessiner() { -  dessin = requestAnimationFrame(dessiner); + dessin = requestAnimationFrame(dessiner); -  analyseur.getByteFrequencyData(tableauDonnees); + analyseur.getByteFrequencyData(tableauDonnees); -  contexteCanvas.fillStyle = 'rgb(0, 0, 0)'; -  contexteCanvas.fillRect(0, 0, LARGEUR, HAUTEUR); + contexteCanvas.fillStyle = 'rgb(0, 0, 0)'; + contexteCanvas.fillRect(0, 0, LARGEUR, HAUTEUR); -  var largeurBarre = (LARGEUR / tailleMemoireTampon) * 2.5; -  var hauteurBarre; -  var x = 0; + var largeurBarre = (LARGEUR / tailleMemoireTampon) * 2.5; + var hauteurBarre; + var x = 0; -  for(var i = 0; i < tailleMemoireTampon; i++) { -    hauteurBarre = tableauDonnees[i]; - -    contexteCanvas.fillStyle = 'rgb(' + (hauteurBarre+100) + ',50,50)'; -    contexteCanvas.fillRect(x,HAUTEUR-hauteurBarre/2,largeurBarre,hauteurBarre/2); - -    x += largeurBarre + 1; -  } + for(var i = 0; i < tailleMemoireTampon; i++) { + hauteurBarre = tableauDonnees[i]; + + contexteCanvas.fillStyle = 'rgb(' + (hauteurBarre+100) + ',50,50)'; + contexteCanvas.fillRect(x,HAUTEUR-hauteurBarre/2,largeurBarre,hauteurBarre/2); + + x += largeurBarre + 1; + } }; dessiner(); @@ -77,7 +77,7 @@ dessiner(); | Spécification | Statut | Commentaire | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | ----------- | -| {{SpecName('Web Audio API', '#widl-AnalyserNode-getByteFrequencyData-void-Uint8Array-array', 'getByteFrequencyData()')}} | {{Spec2('Web Audio API')}} |   | +| {{SpecName('Web Audio API', '#widl-AnalyserNode-getByteFrequencyData-void-Uint8Array-array', 'getByteFrequencyData()')}} | {{Spec2('Web Audio API')}} | | ## Compatibilité navigateurs -- cgit v1.2.3-54-g00ecf