mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
pcmbuf: bug fix with pcmbuf flush, code cleanup, added comments
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23608 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
db4cab0e66
commit
0db3308cb5
4 changed files with 64 additions and 68 deletions
|
@ -239,14 +239,12 @@ static int process_dsp(const void *ch1, const void *ch2, int count)
|
|||
}
|
||||
|
||||
/* Null output */
|
||||
static bool pcmbuf_insert_null(const void *ch1, const void *ch2, int count)
|
||||
static void pcmbuf_insert_null(const void *ch1, const void *ch2, int count)
|
||||
{
|
||||
if (use_dsp) process_dsp(ch1, ch2, count);
|
||||
|
||||
/* Prevent idle poweroff */
|
||||
rb->reset_poweroff_timer();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline int32_t clip_sample(int32_t sample)
|
||||
|
@ -259,7 +257,7 @@ static inline int32_t clip_sample(int32_t sample)
|
|||
|
||||
|
||||
/* WAV output */
|
||||
static bool pcmbuf_insert_wav(const void *ch1, const void *ch2, int count)
|
||||
static void pcmbuf_insert_wav(const void *ch1, const void *ch2, int count)
|
||||
{
|
||||
const int16_t* data1_16;
|
||||
const int16_t* data2_16;
|
||||
|
@ -360,8 +358,6 @@ static bool pcmbuf_insert_wav(const void *ch1, const void *ch2, int count)
|
|||
wavinfo.totalsamples += count;
|
||||
rb->write(wavinfo.fd, wavbuffer, p - wavbuffer);
|
||||
} /* else */
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Set song position in WPS (value in ms). */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue