summaryrefslogtreecommitdiff
path: root/apps/tdspeed.c
diff options
context:
space:
mode:
authorSteve Bavin <pondlife@pondlife.me>2009-06-15 15:46:09 +0000
committerSteve Bavin <pondlife@pondlife.me>2009-06-15 15:46:09 +0000
commit77f6f4caadfab255eed4d4cfbd471cb981ccb073 (patch)
tree9f4893b5e5b21763e9dbe9c449c34ca06ae3e7b4 /apps/tdspeed.c
parent3391bf3543876205c253544aa5ba42140b7d8ad0 (diff)
downloadrockbox-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.c18
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;
54static int32_t *overlap_buffer[2] = { NULL, NULL }; 54static int32_t *overlap_buffer[2] = { NULL, NULL };
55static int32_t *outbuf[2] = { NULL, NULL }; 55static int32_t *outbuf[2] = { NULL, NULL };
56 56
57bool tdspeed_init(int samplerate, bool stereo, int factor) 57void 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
71bool 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)