浏览代码

stb_vorbis: Fix some unused variables.

Fixes issue #817.
Fabian Giesen 4 年之前
父节点
当前提交
0def11ae17
共有 1 个文件被更改,包括 1 次插入5 次删除
  1. 1 5
      stb_vorbis.c

+ 1 - 5
stb_vorbis.c

@@ -4989,7 +4989,7 @@ unsigned int stb_vorbis_stream_length_in_samples(stb_vorbis *f)
             // set. whoops!
             // set. whoops!
             break;
             break;
          }
          }
-         previous_safe = last_page_loc+1;
+         //previous_safe = last_page_loc+1; // NOTE: not used after this point, but note for debugging
          last_page_loc = stb_vorbis_get_file_offset(f);
          last_page_loc = stb_vorbis_get_file_offset(f);
       }
       }
 
 
@@ -5309,8 +5309,6 @@ int stb_vorbis_get_samples_short_interleaved(stb_vorbis *f, int channels, short
    float **outputs;
    float **outputs;
    int len = num_shorts / channels;
    int len = num_shorts / channels;
    int n=0;
    int n=0;
-   int z = f->channels;
-   if (z > channels) z = channels;
    while (n < len) {
    while (n < len) {
       int k = f->channel_buffer_end - f->channel_buffer_start;
       int k = f->channel_buffer_end - f->channel_buffer_start;
       if (n+k >= len) k = len - n;
       if (n+k >= len) k = len - n;
@@ -5329,8 +5327,6 @@ int stb_vorbis_get_samples_short(stb_vorbis *f, int channels, short **buffer, in
 {
 {
    float **outputs;
    float **outputs;
    int n=0;
    int n=0;
-   int z = f->channels;
-   if (z > channels) z = channels;
    while (n < len) {
    while (n < len) {
       int k = f->channel_buffer_end - f->channel_buffer_start;
       int k = f->channel_buffer_end - f->channel_buffer_start;
       if (n+k >= len) k = len - n;
       if (n+k >= len) k = len - n;