forked from len0rd/rockbox
different kind of recording beep: more faint, but not disturbing prerecording, can beep while we already record (no latency due to beep)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5511 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
35c69283d4
commit
dfa95c334b
3 changed files with 13 additions and 13 deletions
|
@ -2377,17 +2377,17 @@ void mpeg_set_recording_gain(int left, int right, bool use_mic)
|
|||
}
|
||||
|
||||
/* try to make some kind of beep, also in recording mode */
|
||||
void mpeg_beep(int freq, int duration)
|
||||
void mpeg_beep(int duration)
|
||||
{
|
||||
(void)freq; /* not used yet */
|
||||
long starttick = current_tick;
|
||||
do
|
||||
{
|
||||
mas_codec_writereg(0, 0); /* some little-understood sequence, */
|
||||
mas_codec_writereg(0, 1); /* there may be better ways */
|
||||
{ /* toggle bit 0 of codec register 0, toggling the DAC off & on.
|
||||
* While this is still audible even without an external signal,
|
||||
* it doesn't affect the (pre-)recording. */
|
||||
mas_codec_writereg(0, shadow_codec_reg0 ^ 1);
|
||||
mas_codec_writereg(0, shadow_codec_reg0);
|
||||
}
|
||||
while (current_tick - starttick < duration);
|
||||
mas_codec_writereg(0, shadow_codec_reg0); /* restore it */
|
||||
}
|
||||
|
||||
void mpeg_new_file(const char *filename)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue