* this should fix the slider length to be correct for all samples
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@589 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -280,7 +280,7 @@ TFB_SoundDecoder* SoundDecoder_Load (char *filename, uint32 buffer_size,
|
|||||||
decoder->frequency = vinfo->rate;
|
decoder->frequency = vinfo->rate;
|
||||||
decoder->looping = false;
|
decoder->looping = false;
|
||||||
decoder->error = SOUNDDECODER_OK;
|
decoder->error = SOUNDDECODER_OK;
|
||||||
decoder->length = (float) ov_time_total (vf, -1);
|
decoder->length = (float) ov_time_total (vf, -1) - (startTime / 1000.0f);
|
||||||
if (runTime && runTime / 1000.0 < decoder->length)
|
if (runTime && runTime / 1000.0 < decoder->length)
|
||||||
decoder->length = (float)(runTime / 1000.0);
|
decoder->length = (float)(runTime / 1000.0);
|
||||||
|
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ TFB_SoundDecoder* SoundDecoder_Load (char *filename, ALuint buffer_size, unsigne
|
|||||||
decoder->frequency = vinfo->rate;
|
decoder->frequency = vinfo->rate;
|
||||||
decoder->looping = AL_FALSE;
|
decoder->looping = AL_FALSE;
|
||||||
decoder->error = SOUNDDECODER_OK;
|
decoder->error = SOUNDDECODER_OK;
|
||||||
decoder->length = (float) ov_time_total (vf, -1);
|
decoder->length = (float) ov_time_total (vf, -1) - (startTime / 1000.0f);
|
||||||
if (runTime && runTime / 1000.0 < decoder->length)
|
if (runTime && runTime / 1000.0 < decoder->length)
|
||||||
decoder->length = (float)(runTime / 1000.0);
|
decoder->length = (float)(runTime / 1000.0);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user