address review comments
This commit is contained in:
parent
35aac3d26b
commit
4608877c12
@ -153,7 +153,7 @@ STATIC void audio_dma_load_next_block(audio_dma_t *dma, size_t buffer_idx) {
|
||||
}
|
||||
|
||||
// Convert the sample format resolution and signedness, as necessary.
|
||||
// The input sample buffer is what was read from a file or a raw sample buffer.
|
||||
// The input sample buffer is what was read from a file, Mixer, or a raw sample buffer.
|
||||
// The output buffer is one of the DMA buffers (passed in), or if no conversion was done,
|
||||
// the original sample buffer (to save copying).
|
||||
|
||||
@ -370,13 +370,6 @@ void audio_dma_stop(audio_dma_t *dma) {
|
||||
dma_channel_abort(channel);
|
||||
}
|
||||
|
||||
// Write a zero as the last sample. This stops any PWM output.
|
||||
if (dma->output_resolution <= 8) {
|
||||
*((uint8_t *)dma->output_register_address) = 0;
|
||||
} else {
|
||||
*((uint16_t *)dma->output_register_address) = 0;
|
||||
}
|
||||
|
||||
dma_channel_set_read_addr(channel, NULL, false /* trigger */);
|
||||
dma_channel_set_write_addr(channel, NULL, false /* trigger */);
|
||||
dma_channel_set_trans_count(channel, 0, false /* trigger */);
|
||||
|
Loading…
Reference in New Issue
Block a user