Skip to content

Commit

Permalink
Fix OGG speech ending prematurely if the audio file size is a multipl…
Browse files Browse the repository at this point in the history
…e of the read buffer size (32786). This makes the engine correctly mark the last buffer to decode even if it has the same size as the read buffer.

The MP3 case seems similar so the fix is applied there too.
  • Loading branch information
jjsat committed Dec 12, 2013
1 parent 3ea19e6 commit 7fda041
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Engine/media/audio/clip_mymp3.cpp
Expand Up @@ -52,7 +52,7 @@ int MYMP3::poll()

if (tempbuf != NULL) {
int free_val = -1;
if (chunksize > in->todo) {
if (chunksize >= in->todo) {
chunksize = in->todo;
free_val = chunksize;
}
Expand Down
2 changes: 1 addition & 1 deletion Engine/media/audio/clip_myogg.cpp
Expand Up @@ -55,7 +55,7 @@ int MYOGG::poll()
if (tempbuf != NULL)
{
int free_val = -1;
if (chunksize > in->todo)
if (chunksize >= in->todo)
{
chunksize = in->todo;
free_val = chunksize;
Expand Down

0 comments on commit 7fda041

Please sign in to comment.