From f7257d56288a3d59007062db3116b30d8aa71d58 Mon Sep 17 00:00:00 2001 From: Taylor Hutt Date: Tue, 21 Aug 2012 11:25:14 -0700 Subject: Short-circuit looping for audio in Sandbox U-Boot builds Sandbox U-Boot has no sound, so there is no point in looping while it doesn't really play. BRANCH=none BUG=chromium-os:32603 TEST=Sandbox U-Boot has no sound, no need to loop Signed-off-by: Taylor Hutt Change-Id: I5ff987d9d80c2d24ae6502c36cf399e582dff524 Reviewed-on: https://gerrit.chromium.org/gerrit/31015 Reviewed-by: Bill Richardson Commit-Ready: Taylor Hutt Reviewed-by: Taylor Hutt Tested-by: Taylor Hutt --- firmware/lib/vboot_audio.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'firmware/lib') diff --git a/firmware/lib/vboot_audio.c b/firmware/lib/vboot_audio.c index 87921266..f9d28f61 100644 --- a/firmware/lib/vboot_audio.c +++ b/firmware/lib/vboot_audio.c @@ -236,6 +236,10 @@ int VbAudioLooping(VbAudioContext* audio) { uint16_t msec = 0; int looping = 1; +#if defined(CONFIG_SANDBOX) + return 0; +#endif + now = VbExGetTimer(); while (audio->next_note < audio->note_count && now >= audio->play_until) { freq = audio->music_notes[audio->next_note].frequency; -- cgit v1.2.1