diff options
author | Steve Bavin <pondlife@pondlife.me> | 2009-06-15 15:46:09 +0000 |
---|---|---|
committer | Steve Bavin <pondlife@pondlife.me> | 2009-06-15 15:46:09 +0000 |
commit | 77f6f4caadfab255eed4d4cfbd471cb981ccb073 (patch) | |
tree | 9f4893b5e5b21763e9dbe9c449c34ca06ae3e7b4 /apps/tdspeed.c | |
parent | 3391bf3543876205c253544aa5ba42140b7d8ad0 (diff) | |
download | rockbox-77f6f4caadfab255eed4d4cfbd471cb981ccb073.tar.gz rockbox-77f6f4caadfab255eed4d4cfbd471cb981ccb073.zip |
Fix FS#10331 and get mpegplayer working again.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21293 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tdspeed.c')
-rw-r--r-- | apps/tdspeed.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/apps/tdspeed.c b/apps/tdspeed.c index 67f749f6c3..f365e95e03 100644 --- a/apps/tdspeed.c +++ b/apps/tdspeed.c | |||
@@ -54,11 +54,8 @@ static struct tdspeed_state_s tdspeed_state; | |||
54 | static int32_t *overlap_buffer[2] = { NULL, NULL }; | 54 | static int32_t *overlap_buffer[2] = { NULL, NULL }; |
55 | static int32_t *outbuf[2] = { NULL, NULL }; | 55 | static int32_t *outbuf[2] = { NULL, NULL }; |
56 | 56 | ||
57 | bool tdspeed_init(int samplerate, bool stereo, int factor) | 57 | void tdspeed_init() |
58 | { | 58 | { |
59 | struct tdspeed_state_s *st = &tdspeed_state; | ||
60 | int src_frame_sz; | ||
61 | |||
62 | /* Allocate buffers */ | 59 | /* Allocate buffers */ |
63 | if (overlap_buffer[0] == NULL) | 60 | if (overlap_buffer[0] == NULL) |
64 | overlap_buffer[0] = (int32_t *) buffer_alloc(FIXED_BUFSIZE * sizeof(int32_t)); | 61 | overlap_buffer[0] = (int32_t *) buffer_alloc(FIXED_BUFSIZE * sizeof(int32_t)); |
@@ -68,6 +65,19 @@ bool tdspeed_init(int samplerate, bool stereo, int factor) | |||
68 | outbuf[0] = (int32_t *) buffer_alloc(TDSPEED_OUTBUFSIZE * sizeof(int32_t)); | 65 | outbuf[0] = (int32_t *) buffer_alloc(TDSPEED_OUTBUFSIZE * sizeof(int32_t)); |
69 | if (outbuf[1] == NULL) | 66 | if (outbuf[1] == NULL) |
70 | outbuf[1] = (int32_t *) buffer_alloc(TDSPEED_OUTBUFSIZE * sizeof(int32_t)); | 67 | outbuf[1] = (int32_t *) buffer_alloc(TDSPEED_OUTBUFSIZE * sizeof(int32_t)); |
68 | } | ||
69 | |||
70 | |||
71 | bool tdspeed_config(int samplerate, bool stereo, int factor) | ||
72 | { | ||
73 | struct tdspeed_state_s *st = &tdspeed_state; | ||
74 | int src_frame_sz; | ||
75 | |||
76 | /* Check buffers were allocated ok */ | ||
77 | if (overlap_buffer[0] == NULL || overlap_buffer[1] == NULL) | ||
78 | return false; | ||
79 | if (outbuf[0] == NULL || outbuf[1] == NULL) | ||
80 | return false; | ||
71 | 81 | ||
72 | /* Check parameters */ | 82 | /* Check parameters */ |
73 | if (factor == 100) | 83 | if (factor == 100) |