Search
lxdream.org :: lxdream/src/aica/audio.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/aica/audio.c
changeset 934:3acd3b3ee6d1
prev779:a60e47313e7b
next989:7baf5ecd8e98
author nkeynes
date Tue Jan 13 11:56:28 2009 +0000 (11 years ago)
permissions -rw-r--r--
last change Merge lxdream-mem branch back to trunk
file annotate diff log raw
1.1 --- a/src/aica/audio.c Mon Jul 28 10:10:13 2008 +0000
1.2 +++ b/src/aica/audio.c Tue Jan 13 11:56:28 2009 +0000
1.3 @@ -68,8 +68,6 @@
1.4
1.5 #define NEXT_BUFFER() ((audio.write_buffer == NUM_BUFFERS-1) ? 0 : audio.write_buffer+1)
1.6
1.7 -extern char *arm_mem;
1.8 -
1.9 /**
1.10 * Preserve audio channel state only - don't bother saving the buffers
1.11 */
1.12 @@ -299,7 +297,7 @@
1.13 switch( channel->sample_format ) {
1.14 case AUDIO_FMT_16BIT:
1.15 for( j=0; j<num_samples; j++ ) {
1.16 - sample = ((int16_t *)(arm_mem + channel->start))[channel->posn];
1.17 + sample = ((int16_t *)(aica_main_ram + channel->start))[channel->posn];
1.18 result_buf[j][0] += sample * vol_left;
1.19 result_buf[j][1] += sample * vol_right;
1.20
1.21 @@ -323,7 +321,7 @@
1.22 break;
1.23 case AUDIO_FMT_8BIT:
1.24 for( j=0; j<num_samples; j++ ) {
1.25 - sample = ((int8_t *)(arm_mem + channel->start))[channel->posn] << 8;
1.26 + sample = ((int8_t *)(aica_main_ram + channel->start))[channel->posn] << 8;
1.27 result_buf[j][0] += sample * vol_left;
1.28 result_buf[j][1] += sample * vol_right;
1.29
1.30 @@ -366,7 +364,7 @@
1.31 break;
1.32 }
1.33 }
1.34 - uint8_t data = ((uint8_t *)(arm_mem + channel->start))[channel->posn>>1];
1.35 + uint8_t data = ((uint8_t *)(aica_main_ram + channel->start))[channel->posn>>1];
1.36 if( channel->posn&1 ) {
1.37 adpcm_yamaha_decode_nibble( channel, (data >> 4) & 0x0F );
1.38 } else {
1.39 @@ -478,7 +476,7 @@
1.40 if( audio.channels[channel].sample_format == AUDIO_FMT_ADPCM ) {
1.41 audio.channels[channel].adpcm_step = 0;
1.42 audio.channels[channel].adpcm_predict = 0;
1.43 - uint8_t data = ((uint8_t *)(arm_mem + audio.channels[channel].start))[0];
1.44 + uint8_t data = ((uint8_t *)(aica_main_ram + audio.channels[channel].start))[0];
1.45 adpcm_yamaha_decode_nibble( &audio.channels[channel], data & 0x0F );
1.46 }
1.47 }
.