@@ -1790,9 +1790,9 @@ void UpdateMusicStream(Music music)
17901790 {
17911791 while (true)
17921792 {
1793- int frameCountRed = (int )drwav_read_pcm_frames_s16 ((drwav * )music .ctxData , frameCountStillNeeded , (short * )((char * )AUDIO .System .pcmBuffer + frameCountReadTotal * frameSize ));
1794- frameCountReadTotal += frameCountRed ;
1795- frameCountStillNeeded -= frameCountRed ;
1793+ int frameCountRead = (int )drwav_read_pcm_frames_s16 ((drwav * )music .ctxData , frameCountStillNeeded , (short * )((char * )AUDIO .System .pcmBuffer + frameCountReadTotal * frameSize ));
1794+ frameCountReadTotal += frameCountRead ;
1795+ frameCountStillNeeded -= frameCountRead ;
17961796 if (frameCountStillNeeded == 0 ) break ;
17971797 else drwav_seek_to_first_pcm_frame ((drwav * )music .ctxData );
17981798 }
@@ -1801,9 +1801,9 @@ void UpdateMusicStream(Music music)
18011801 {
18021802 while (true)
18031803 {
1804- int frameCountRed = (int )drwav_read_pcm_frames_f32 ((drwav * )music .ctxData , frameCountStillNeeded , (float * )((char * )AUDIO .System .pcmBuffer + frameCountReadTotal * frameSize ));
1805- frameCountReadTotal += frameCountRed ;
1806- frameCountStillNeeded -= frameCountRed ;
1804+ int frameCountRead = (int )drwav_read_pcm_frames_f32 ((drwav * )music .ctxData , frameCountStillNeeded , (float * )((char * )AUDIO .System .pcmBuffer + frameCountReadTotal * frameSize ));
1805+ frameCountReadTotal += frameCountRead ;
1806+ frameCountStillNeeded -= frameCountRead ;
18071807 if (frameCountStillNeeded == 0 ) break ;
18081808 else drwav_seek_to_first_pcm_frame ((drwav * )music .ctxData );
18091809 }
@@ -1815,9 +1815,9 @@ void UpdateMusicStream(Music music)
18151815 {
18161816 while (true)
18171817 {
1818- int frameCountRed = stb_vorbis_get_samples_short_interleaved ((stb_vorbis * )music .ctxData , music .stream .channels , (short * )((char * )AUDIO .System .pcmBuffer + frameCountReadTotal * frameSize ), frameCountStillNeeded * music .stream .channels );
1819- frameCountReadTotal += frameCountRed ;
1820- frameCountStillNeeded -= frameCountRed ;
1818+ int frameCountRead = stb_vorbis_get_samples_short_interleaved ((stb_vorbis * )music .ctxData , music .stream .channels , (short * )((char * )AUDIO .System .pcmBuffer + frameCountReadTotal * frameSize ), frameCountStillNeeded * music .stream .channels );
1819+ frameCountReadTotal += frameCountRead ;
1820+ frameCountStillNeeded -= frameCountRead ;
18211821 if (frameCountStillNeeded == 0 ) break ;
18221822 else stb_vorbis_seek_start ((stb_vorbis * )music .ctxData );
18231823 }
0 commit comments