Ticket #6489: audio_dx.patch

File audio_dx.patch, 591 bytes (added by Jeff Lu <jll544@…>, 11 years ago)

patch

  • libs/libmyth/audiooutputdx.cpp

     
    339339        return -1;
    340340    }
    341341
    342     int frames = (write_cursor - play_pos) / audio_bytes_per_sample;
     342    int frames = ((int)write_cursor - (int)play_pos) / audio_bytes_per_sample;
    343343   
    344344    if (frames < 0)
    345         frames += buffer_size;
     345        frames += buffer_size / audio_bytes_per_sample;
    346346
    347347    return audbuf_timecode - (int)((frames*1000.0) / effdsp);
    348348}