mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
as3525: implement pcm_play_dma_get_peak_buffer correctly
give the real amount of bytes left to transfer git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26311 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
65f4d393fd
commit
bdb8ba4ecd
1 changed files with 5 additions and 2 deletions
|
|
@ -167,8 +167,11 @@ size_t pcm_get_bytes_waiting(void)
|
|||
|
||||
const void * pcm_play_dma_get_peak_buffer(int *count)
|
||||
{
|
||||
*count = dma_size >> 2;
|
||||
return (const void*)dma_start_addr;
|
||||
pcm_play_lock();
|
||||
unsigned char *addr = (void*)DMAC_CH_SRC_ADDR(1);
|
||||
*count = (dma_size - (addr - dma_start_addr)) >> 2;
|
||||
pcm_play_unlock();
|
||||
return AS3525_UNCACHED_ADDR(addr);
|
||||
}
|
||||
|
||||
#ifdef HAVE_PCM_DMA_ADDRESS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue