Ecere Software
/
sdk
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
88872bf
)
samples/audio/DirectBufferPlayer: Fixed playing 16 bit sounds
author
Jerome St-Louis
<jerome@ecere.com>
Fri, 18 Apr 2014 08:54:26 +0000
(
04:54
-0400)
committer
Jerome St-Louis
<jerome@ecere.com>
Fri, 18 Apr 2014 08:54:26 +0000
(
04:54
-0400)
samples/audio/DirectBufferPlayer/wavPlayer.ec
patch
|
blob
|
history
diff --git
a/samples/audio/DirectBufferPlayer/wavPlayer.ec
b/samples/audio/DirectBufferPlayer/wavPlayer.ec
index
790e5fc
..
4346806
100644
(file)
--- a/
samples/audio/DirectBufferPlayer/wavPlayer.ec
+++ b/
samples/audio/DirectBufferPlayer/wavPlayer.ec
@@
-62,7
+62,7
@@
class Form1 : Window
void AudioCallback(byte *stream, int len)
{
static byte buffer[AUDIO_BUFFER_SIZE];
- int s = Min(sound.length - pos, len);
+ int s = Min(sound.length
* (sound.bits == 16 ? 2 : 1)
- pos, len);
memcpy(buffer, sound.data + pos, s);
pos += s;
if(s < len)