[vlc-commits] opensles: fix static noise at 44.1kHz

Rafaël Carré git at videolan.org
Fri Dec 21 11:05:13 CET 2012


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Fri Dec 21 11:03:57 2012 +0100| [639ee4abbf37c901d85103ef8f72daba66a01100] | committer: Rafaël Carré

opensles: fix static noise at 44.1kHz

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=639ee4abbf37c901d85103ef8f72daba66a01100
---

 modules/audio_output/opensles_android.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/audio_output/opensles_android.c b/modules/audio_output/opensles_android.c
index d1a63a97b..e9467c4 100644
--- a/modules/audio_output/opensles_android.c
+++ b/modules/audio_output/opensles_android.c
@@ -401,6 +401,7 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt)
 
     /* XXX: rounding shouldn't affect us at normal sampling rate */
     sys->buf_unit_size = OPENSLES_BUFLEN * fmt->i_rate * 2 /* channels */ * 2 /* bps */ / 1000;
+    sys->buf_unit_size = (sys->buf_unit_size + 3) & ~3; // align on sample boundary
     sys->buf = malloc(OPENSLES_BUFFERS * sys->buf_unit_size);
     if (!sys->buf)
         goto error;



More information about the vlc-commits mailing list