228 |
*/ |
*/ |
229 |
|
|
230 |
/* Private data */ |
/* Private data */ |
231 |
typedef struct ratestuff { |
struct rate { |
232 |
uint64_t opos; |
uint64_t opos; |
233 |
uint64_t opos_inc; |
uint64_t opos_inc; |
234 |
uint32_t ipos; /* position in the input stream (integer) */ |
uint32_t ipos; /* position in the input stream (integer) */ |
235 |
st_sample_t ilast; /* last sample in the input stream */ |
st_sample_t ilast; /* last sample in the input stream */ |
236 |
} *rate_t; |
}; |
237 |
|
|
238 |
/* |
/* |
239 |
* Prepare processing. |
* Prepare processing. |
240 |
*/ |
*/ |
241 |
void *st_rate_start (int inrate, int outrate) |
void *st_rate_start (int inrate, int outrate) |
242 |
{ |
{ |
243 |
rate_t rate = (rate_t) qemu_mallocz (sizeof (struct ratestuff)); |
struct rate *rate = audio_calloc (AUDIO_FUNC, 1, sizeof (*rate)); |
244 |
|
|
245 |
if (!rate) { |
if (!rate) { |
246 |
|
dolog ("Could not allocate resampler (%d bytes)\n", sizeof (*rate)); |
247 |
return NULL; |
return NULL; |
248 |
} |
} |
249 |
|
|