diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2009-08-05 23:23:44 +0200 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2009-08-05 23:23:44 +0200 |
commit | 337d90098cf48c6e3600f321081492e33cc48229 (patch) | |
tree | ef0d26f051f02cfcf1b96a10fffbd92976c52990 /psdl.c | |
parent | 8f749dbc5721172d1e5cf9742955fb429fa0062a (diff) |
alsa playback WIP
Diffstat (limited to 'psdl.c')
-rw-r--r-- | psdl.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -4,7 +4,7 @@ #include "common.h" static int sdl_player_numsamples = 4096; -int sdl_player_freq; +static int sdl_player_freq; static SDL_AudioSpec spec; static void psdl_callback (void *userdata, Uint8 *stream, int len); static float sdl_volume = 1; @@ -20,6 +20,7 @@ le_int16 (int16_t in, char *out) { out[0] = pin[1]; #endif } + int psdl_init (void) { SDL_AudioSpec obt; @@ -94,6 +95,11 @@ psdl_set_volume (float vol) { sdl_volume = vol; } +int +psdl_get_rate (void) { + return sdl_player_freq; +} + static void psdl_callback (void* userdata, Uint8 *stream, int len) { int bytesread = streamer_read (stream, len); |