Lines Matching refs:info

33     SF_INFO info;
62 static SNDFILE *sf_open_read(const char *path, SF_INFO *info)
74 handle->info.format = SF_FORMAT_WAV;
173 handle->info.samplerate = samplerate;
174 handle->info.channels = channels;
177 handle->info.format |= SF_FORMAT_PCM_U8;
180 handle->info.format |= SF_FORMAT_PCM_16;
184 handle->info.format |= SF_FORMAT_FLOAT;
186 handle->info.format |= SF_FORMAT_PCM_32;
200 handle->info.frames = handle->remaining;
225 *info = handle->info;
242 static SNDFILE *sf_open_write(const char *path, SF_INFO *info)
244 int sub = info->format & SF_FORMAT_SUBMASK;
246 (info->samplerate > 0) &&
247 (info->channels > 0 && info->channels <= 8) &&
248 ((info->format & SF_FORMAT_TYPEMASK) == SF_FORMAT_WAV) &&
271 wav[22] = info->channels;
272 write4u(&wav[24], info->samplerate);
288 unsigned blockAlignment = (bitsPerSample >> 3) * info->channels;
289 unsigned byteRate = info->samplerate * blockAlignment;
309 handle->info = *info;
313 SNDFILE *sf_open(const char *path, int mode, SF_INFO *info)
315 if (path == NULL || info == NULL) {
316 fprintf(stderr, "path=%p info=%p\n", path, info);
321 return sf_open_read(path, info);
323 return sf_open_write(path, info);
339 size_t extra = (handle->info.format & SF_FORMAT_SUBMASK) == SF_FORMAT_FLOAT ? 14 : 0;
364 unsigned format = handle->info.format & SF_FORMAT_SUBMASK;
375 memcpy_to_i16_from_u8(ptr, (unsigned char *) ptr, actualFrames * handle->info.channels);
379 my_swab(ptr, actualFrames * handle->info.channels);
382 memcpy_to_i16_from_i32(ptr, (const int *) temp, actualFrames * handle->info.channels);
386 memcpy_to_i16_from_float(ptr, (const float *) temp, actualFrames * handle->info.channels);
390 memset(ptr, 0, actualFrames * handle->info.channels * sizeof(short));
409 unsigned format = handle->info.format & SF_FORMAT_SUBMASK;
423 actualFrames * handle->info.channels);
428 memcpy_to_float_from_i16(ptr, (const short *) temp, actualFrames * handle->info.channels);
432 memcpy_to_float_from_i32(ptr, (const int *) ptr, actualFrames * handle->info.channels);
437 memset(ptr, 0, actualFrames * handle->info.channels * sizeof(float));
455 unsigned format = handle->info.format & SF_FORMAT_SUBMASK;
470 actualFrames * handle->info.channels);
475 memcpy_to_i32_from_i16(ptr, (const short *) temp, actualFrames * handle->info.channels);
481 memcpy_to_i32_from_float(ptr, (const float *) ptr, actualFrames * handle->info.channels);
484 memset(ptr, 0, actualFrames * handle->info.channels * sizeof(int));
496 switch (handle->info.format & SF_FORMAT_SUBMASK) {
509 my_swab((short *) handle->temp, desiredFrames * handle->info.channels);
516 desiredFrames * handle->info.channels);
533 switch (handle->info.format & SF_FORMAT_SUBMASK) {
540 desiredFrames * handle->info.channels);