aboutsummaryrefslogtreecommitdiffstats
path: root/src/uxn/devices/apu.c
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2021-05-26 13:39:54 +0200
committerBad Diode <bd@badd10de.dev>2021-05-26 13:39:54 +0200
commit2a7893e230c521bc0f8aed7c4307ccf4cacaa767 (patch)
tree54784b195f5617a44945c0f4ed032acdfc0b1859 /src/uxn/devices/apu.c
parent5497bf0faae483daf44b4909cee81da48fdc86be (diff)
downloaduxngba-2a7893e230c521bc0f8aed7c4307ccf4cacaa767.tar.gz
uxngba-2a7893e230c521bc0f8aed7c4307ccf4cacaa767.zip
Prototyping live resampling of uxn samples
Diffstat (limited to 'src/uxn/devices/apu.c')
-rw-r--r--src/uxn/devices/apu.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/uxn/devices/apu.c b/src/uxn/devices/apu.c
index fbe7c3d..b2ccc18 100644
--- a/src/uxn/devices/apu.c
+++ b/src/uxn/devices/apu.c
@@ -172,7 +172,7 @@ reset_sound(AudioChannel *chan) {
172 172
173 // Prepare DMA copy. 173 // Prepare DMA copy.
174 dma_transfer_copy(SOUND_FIFO_A, chan->samples, 1, 1, 174 dma_transfer_copy(SOUND_FIFO_A, chan->samples, 1, 1,
175 DMA_CHUNK_32 | DMA_REFRESH | DMA_REPEAT | DMA_ENABLE); 175 DMA_DST_FIXED | DMA_CHUNK_32 | DMA_REFRESH | DMA_REPEAT | DMA_ENABLE);
176 176
177 // Timer 1 used to stop playing samples. 177 // Timer 1 used to stop playing samples.
178 u32 sample_duration = chan->n_samples; 178 u32 sample_duration = chan->n_samples;
@@ -196,9 +196,6 @@ u8 square_wave[] = {
196 196
197void 197void
198init_sound(AudioChannel *chan) { 198init_sound(AudioChannel *chan) {
199 // Enable sound.
200 SOUND_STATUS = SOUND_ENABLE;
201
202 // chan->samples = &square_wave; 199 // chan->samples = &square_wave;
203 // chan->n_samples = 2; 200 // chan->n_samples = 2;
204 // chan->samples = &samples; 201 // chan->samples = &samples;