mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
Jz4740 PCM driver: check whether pcm_callback_for_more isn't NULL (fixes metronome)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22072 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
8ef07c8a2f
commit
86ef57b975
1 changed files with 5 additions and 3 deletions
|
|
@ -81,11 +81,13 @@ static inline void set_dma(const void *addr, size_t size)
|
|||
|
||||
static inline void play_dma_callback(void)
|
||||
{
|
||||
unsigned char *start;
|
||||
unsigned char *start = NULL;
|
||||
size_t size = 0;
|
||||
pcm_callback_for_more(&start, &size);
|
||||
|
||||
if(LIKELY(size > 0))
|
||||
if(pcm_callback_for_more)
|
||||
pcm_callback_for_more(&start, &size);
|
||||
|
||||
if(LIKELY(size > 0 && start))
|
||||
{
|
||||
set_dma(start, size);
|
||||
REG_DMAC_DCCSR(DMA_AIC_TX_CHANNEL) |= DMAC_DCCSR_EN;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue