diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2006-11-27 13:54:50 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2006-11-27 13:54:50 +0000 |
commit | a1af87ffe7c579073367823d3ba115179705203e (patch) | |
tree | cf0773618c0d273daa340ee33de8a234cd2c41cd | |
parent | a45e632495a0b662474771737197658ef22d73f0 (diff) | |
download | rockbox-a1af87ffe7c579073367823d3ba115179705203e.tar.gz rockbox-a1af87ffe7c579073367823d3ba115179705203e.zip |
Avoid calls to audio and talk functions in audio_get_buffer until init is complete. Just good hygiene really.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11615 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/playback.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/playback.c b/apps/playback.c index 90cedc0299..f88c7f6d18 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -378,7 +378,8 @@ unsigned char *audio_get_buffer(bool talk_buf, size_t *buffer_size) { unsigned char *buf, *end; - audio_stop(); + if (audio_is_initialized) + audio_stop(); if (buffer_size == NULL) { @@ -390,8 +391,8 @@ unsigned char *audio_get_buffer(bool talk_buf, size_t *buffer_size) buf = audiobuf; end = audiobufend; - if (talk_buf || !talk_voice_required() - || buffer_state == BUFFER_STATE_TRASHED) + if (talk_buf || buffer_state == BUFFER_STATE_TRASHED + || !talk_voice_required()) { logf("get buffer: talk_buf"); /* ok to use everything from audiobuf to audiobufend */ |