summaryrefslogtreecommitdiff
path: root/firmware/mpeg.c
diff options
context:
space:
mode:
authorJörg Hohensohn <hohensoh@rockbox.org>2004-12-24 08:42:45 +0000
committerJörg Hohensohn <hohensoh@rockbox.org>2004-12-24 08:42:45 +0000
commitdfa95c334b9cffff28059e0de39ae5305e315ee6 (patch)
tree486ed4df9a36170768e68eef2546ab072bb57c7f /firmware/mpeg.c
parent35c69283d4728c9f94d7a5c47026036bec3e17c4 (diff)
downloadrockbox-dfa95c334b9cffff28059e0de39ae5305e315ee6.tar.gz
rockbox-dfa95c334b9cffff28059e0de39ae5305e315ee6.zip
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
Diffstat (limited to 'firmware/mpeg.c')
-rw-r--r--firmware/mpeg.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c
index 26bfbc0dc3..becd3d54cb 100644
--- a/firmware/mpeg.c
+++ b/firmware/mpeg.c
@@ -2377,17 +2377,17 @@ void mpeg_set_recording_gain(int left, int right, bool use_mic)
2377} 2377}
2378 2378
2379/* try to make some kind of beep, also in recording mode */ 2379/* try to make some kind of beep, also in recording mode */
2380void mpeg_beep(int freq, int duration) 2380void mpeg_beep(int duration)
2381{ 2381{
2382 (void)freq; /* not used yet */
2383 long starttick = current_tick; 2382 long starttick = current_tick;
2384 do 2383 do
2385 { 2384 { /* toggle bit 0 of codec register 0, toggling the DAC off & on.
2386 mas_codec_writereg(0, 0); /* some little-understood sequence, */ 2385 * While this is still audible even without an external signal,
2387 mas_codec_writereg(0, 1); /* there may be better ways */ 2386 * it doesn't affect the (pre-)recording. */
2387 mas_codec_writereg(0, shadow_codec_reg0 ^ 1);
2388 mas_codec_writereg(0, shadow_codec_reg0);
2388 } 2389 }
2389 while (current_tick - starttick < duration); 2390 while (current_tick - starttick < duration);
2390 mas_codec_writereg(0, shadow_codec_reg0); /* restore it */
2391} 2391}
2392 2392
2393void mpeg_new_file(const char *filename) 2393void mpeg_new_file(const char *filename)