add some minor comments
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Sean Barrett · committed by Sean Barrett · parent d821fd8 · Browse files · 1 file·+19 added−3 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+19 added−3 removed
- other:+19 added−3 removed
Provenance
- Commit
a200fab- Tree
d9b78da- Author
Sean Barrett <sean2@nothings.org>- Committer
Sean Barrett <sean2@nothings.org>- Parent
d821fd8
1 file changed+19 added−3 removed
modified:stb_vorbis.c+19 added-3 removed
1-// Ogg Vorbis audio decoder - v1.04 - public domain1+// Ogg Vorbis audio decoder - v1.05 - public domain2 // http://nothings.org/stb_vorbis/3 //4 // Written by Sean Barrett in 2007, last updated in 20145 // Sponsored by RAD Game Tools.17 unmodified lines23 // Terje Mathisen Niklas Frykholm Andy Hill24 // Casey Muratori John Bolton Gargaj25 // Laurent Gomila Marc LeBlanc Ronny Chevalier26 // Bernhard Wodo Evan Balster "alxprd"@github27-// Tom Beaumont Ingo Leitgeb27+// Tom Beaumont Ingo Leitgeb Nicolas Guillemot28 // (If you reported a bug but do not appear in this list, it is because29 // someone else reported the bug before you. There were too many of you to30 // list them all because I was lax about updating for a long time, sorry.)31 //32 // Partial history:33+// 1.05 - 2015/04/19 - don't define __forceinline if it's redundant34 // 1.04 - 2014/08/27 - fix missing const-correct case in API35 // 1.03 - 2014/08/07 - warning fixes36 // 1.02 - 2014/07/09 - declare qsort comparison as explicitly _cdecl in Windows37 // 1.01 - 2014/06/18 - fix stb_vorbis_get_samples_float (interleaved was correct)515 unmodified lines553 #else554 #define NULL 0555 #endif556 556-#ifndef _MSC_VER557+#if !defined(_MSC_VER) && !(defined(__MINGW32__) && defined(__forceinline))558 #if __GNUC__559 #define __forceinline inline560 #else561 #define __forceinline2585 unmodified lines3147 }3148 return TRUE;3149 }3150 3151+// The meaning of "left" and "right"3152+//3153+// For a given frame:3154+// we compute samples from 0..n3155+// window_center is n/23156+// we'll window and mix the samples from left_start to left_end with data from the previous frame3157+// all of the samples from left_end to right_start can be output without mixing; however,3158+// this interval is 0-length except when transitioning between short and long frames3159+// all of the samples from right_start to right_end need to be mixed with the next frame,3160+// which we don't have, so those get saved in a buffer3161+// frame N's right_end-right_start, the number of samples to mix with the next frame,3162+// has to be the same as frame N+1's left_end-left_start (which they are by3163+// construction)3164+3165 static int vorbis_decode_initial(vorb *f, int *p_left_start, int *p_left_end, int *p_right_start, int *p_right_end, int *mode)3166 {3167 Mode *m;3168 int i, n, prev, next, window_center;2242 unmodified lines5411 }5412 #endif // STB_VORBIS_NO_PULLDATA_API5413 5414 /* Version history5415+ 1.05 - 2015/04/19 - don't define __forceinline if it's redundant5416 1.04 - 2014/08/27 - fix missing const-correct case in API5417 1.03 - 2014/08/07 - Warning fixes5418 1.02 - 2014/07/09 - Declare qsort compare function _cdecl on windows5419 1.01 - 2014/06/18 - fix stb_vorbis_get_samples_float40 unmodified lines