mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
beep/mixer code: Code police a bit.
/firmware is in the #include path with makes #include "asm/beep.c" sufficient. Add a comment to generic beep code and make another express intent better. Change-Id: I587cd704478b894785927bdfe2e647e28614df62
This commit is contained in:
parent
e5b1b0f998
commit
9a25a6fe19
3 changed files with 5 additions and 2 deletions
|
@ -27,7 +27,7 @@
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
||||||
/** Beep generation, CPU optimized **/
|
/** Beep generation, CPU optimized **/
|
||||||
#include "../firmware/asm/beep.c"
|
#include "asm/beep.c"
|
||||||
|
|
||||||
static uint32_t beep_phase; /* Phase of square wave generator */
|
static uint32_t beep_phase; /* Phase of square wave generator */
|
||||||
static uint32_t beep_step; /* Step of square wave generator on each sample */
|
static uint32_t beep_step; /* Step of square wave generator on each sample */
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include "m68k/beep.c"
|
#include "m68k/beep.c"
|
||||||
#else /* Generic */
|
#else /* Generic */
|
||||||
|
|
||||||
|
/* Actually output samples into beep_buf */
|
||||||
static FORCE_INLINE void beep_generate(int16_t *out, int count,
|
static FORCE_INLINE void beep_generate(int16_t *out, int count,
|
||||||
uint32_t *phase, uint32_t step,
|
uint32_t *phase, uint32_t step,
|
||||||
int16_t amplitude)
|
int16_t amplitude)
|
||||||
|
|
|
@ -271,7 +271,9 @@ void mixer_channel_play_data(enum pcm_mixer_channel channel,
|
||||||
{
|
{
|
||||||
/* Initial buffer not passed - call the callback now */
|
/* Initial buffer not passed - call the callback now */
|
||||||
pcm_play_lock();
|
pcm_play_lock();
|
||||||
mixer_deactivate_channel(chan); /* Protect chan struct if active */
|
mixer_deactivate_channel(chan); /* Protect chan struct if active;
|
||||||
|
may also be same callback which
|
||||||
|
must not be reentered */
|
||||||
pcm_play_unlock(); /* Allow playback while doing callback */
|
pcm_play_unlock(); /* Allow playback while doing callback */
|
||||||
|
|
||||||
size = 0;
|
size = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue