| ... | ... |
@@ -111,8 +111,8 @@ void |
| 111 | 111 |
note_on(AudioChannel *channel, Uint16 duration, Uint8 *data, Uint16 len, Uint8 vol, |
| 112 | 112 |
Uint8 attack, Uint8 decay, Uint8 sustain, Uint8 release, Uint8 pitch, bool loop) {
|
| 113 | 113 |
channel->duration = duration; |
| 114 |
- channel->vol_l = (vol >> 4) / 16.0f * 0.9; |
|
| 115 |
- channel->vol_r = (vol & 0xf) / 16.0f * 0.9; |
|
| 114 |
+ channel->vol_l = (vol >> 4) / 15.0f; |
|
| 115 |
+ channel->vol_r = (vol & 0xf) / 15.0f; |
|
| 116 | 116 |
|
| 117 | 117 |
Sample sample = {0};
|
| 118 | 118 |
sample.data = data; |
| ... | ... |
@@ -278,7 +278,7 @@ audio_handler(void *ctx, Uint8 *out_stream, int len) {
|
| 278 | 278 |
} |
| 279 | 279 |
int i; |
| 280 | 280 |
for (i = 0; i < len / 2; i++) {
|
| 281 |
- stream[i] <<= 4; |
|
| 281 |
+ stream[i] <<= 6; |
|
| 282 | 282 |
} |
| 283 | 283 |
} |
| 284 | 284 |
|