diff options
author | Simon Glass | 2018-11-15 19:56:13 -0700 |
---|---|---|
committer | Simon Glass | 2018-11-29 09:30:05 -0700 |
commit | 7d92b0609093a047ce4b113d77ccd3cc78325e8f (patch) | |
tree | 4afa25f53b27bf4f76cac7e0a80ef8bb1de36242 /arch/sandbox | |
parent | 03f11e87a86307903f40e74495936184063bab79 (diff) |
sound: Add sample rate as a parameter for square wave
At present this value is hard-coded in the function that generates a
square wave. Since sample rates vary between different hardware, it makes
more sense to have this as a parameter.
Update the function and its users.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox')
-rw-r--r-- | arch/sandbox/cpu/sdl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sandbox/cpu/sdl.c b/arch/sandbox/cpu/sdl.c index adcb73826fe..36f1bf0c83b 100644 --- a/arch/sandbox/cpu/sdl.c +++ b/arch/sandbox/cpu/sdl.c @@ -322,7 +322,7 @@ int sandbox_sdl_sound_start(uint frequency) if (!sdl.audio_active) return -1; sdl.frequency = frequency; - sound_create_square_wave((unsigned short *)sdl.audio_data, + sound_create_square_wave(22050, (unsigned short *)sdl.audio_data, sdl.audio_size, frequency); sdl.audio_pos = 0; SDL_PauseAudio(0); |