diff options
Diffstat (limited to 'firmware/mpeg.c')
-rw-r--r-- | firmware/mpeg.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c index 61a8fc8208..d7c360550a 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c | |||
@@ -170,6 +170,7 @@ static struct id3tag _id3tags[MAX_ID3_TAGS]; | |||
170 | 170 | ||
171 | static unsigned int current_track_counter = 0; | 171 | static unsigned int current_track_counter = 0; |
172 | static unsigned int last_track_counter = 0; | 172 | static unsigned int last_track_counter = 0; |
173 | static bool mpeg_is_initialized = false; | ||
173 | 174 | ||
174 | #ifndef SIMULATOR | 175 | #ifndef SIMULATOR |
175 | 176 | ||
@@ -1601,6 +1602,9 @@ void mpeg_sound_set(int setting, int value) | |||
1601 | #else | 1602 | #else |
1602 | int tmp; | 1603 | int tmp; |
1603 | #endif | 1604 | #endif |
1605 | |||
1606 | if(!mpeg_is_initialized) | ||
1607 | return; | ||
1604 | 1608 | ||
1605 | switch(setting) | 1609 | switch(setting) |
1606 | { | 1610 | { |
@@ -2013,6 +2017,9 @@ void mpeg_init(int volume, int bass, int treble, int balance, int loudness, int | |||
2013 | mpeg_sound_channel_config(MPEG_SOUND_STEREO); | 2017 | mpeg_sound_channel_config(MPEG_SOUND_STEREO); |
2014 | 2018 | ||
2015 | #endif | 2019 | #endif |
2020 | |||
2021 | /* Must be done before calling mpeg_sound_set() */ | ||
2022 | mpeg_is_initialized = true; | ||
2016 | 2023 | ||
2017 | mpeg_sound_set(SOUND_BASS, bass); | 2024 | mpeg_sound_set(SOUND_BASS, bass); |
2018 | mpeg_sound_set(SOUND_TREBLE, treble); | 2025 | mpeg_sound_set(SOUND_TREBLE, treble); |