• Home
  • Raw
  • Download

Lines Matching refs:info

36     SF_INFO info;  member
65 static SNDFILE *sf_open_read(const char *path, SF_INFO *info) in sf_open_read() argument
79 handle->info.format = SF_FORMAT_WAV; in sf_open_read()
210 handle->info.samplerate = samplerate; in sf_open_read()
211 handle->info.channels = channels; in sf_open_read()
214 handle->info.format |= SF_FORMAT_PCM_U8; in sf_open_read()
217 handle->info.format |= SF_FORMAT_PCM_16; in sf_open_read()
220 handle->info.format |= SF_FORMAT_PCM_24; in sf_open_read()
224 handle->info.format |= SF_FORMAT_FLOAT; in sf_open_read()
226 handle->info.format |= SF_FORMAT_PCM_32; in sf_open_read()
244 handle->info.frames = handle->remaining; in sf_open_read()
280 *info = handle->info; in sf_open_read()
297 static SNDFILE *sf_open_write(const char *path, SF_INFO *info) in sf_open_write() argument
299 int sub = info->format & SF_FORMAT_SUBMASK; in sf_open_write()
301 (info->samplerate > 0) && in sf_open_write()
302 (info->channels > 0 && info->channels <= FCC_8) && in sf_open_write()
303 ((info->format & SF_FORMAT_TYPEMASK) == SF_FORMAT_WAV) && in sf_open_write()
329 wav[22] = info->channels; in sf_open_write()
330 write4u(&wav[24], info->samplerate); in sf_open_write()
352 unsigned blockAlignment = (bitsPerSample >> 3) * info->channels; in sf_open_write()
353 unsigned byteRate = info->samplerate * blockAlignment; in sf_open_write()
373 handle->info = *info; in sf_open_write()
377 SNDFILE *sf_open(const char *path, int mode, SF_INFO *info) in sf_open() argument
379 if (path == NULL || info == NULL) { in sf_open()
381 fprintf(stderr, "path=%p info=%p\n", path, info); in sf_open()
387 return sf_open_read(path, info); in sf_open()
389 return sf_open_write(path, info); in sf_open()
407 size_t extra = (handle->info.format & SF_FORMAT_SUBMASK) == SF_FORMAT_FLOAT ? 14 : 0; in sf_close()
432 unsigned format = handle->info.format & SF_FORMAT_SUBMASK; in sf_readf_short()
443 memcpy_to_i16_from_u8(ptr, (unsigned char *) ptr, actualFrames * handle->info.channels); in sf_readf_short()
447 my_swab(ptr, actualFrames * handle->info.channels); in sf_readf_short()
450 memcpy_to_i16_from_i32(ptr, (const int *) temp, actualFrames * handle->info.channels); in sf_readf_short()
454 memcpy_to_i16_from_float(ptr, (const float *) temp, actualFrames * handle->info.channels); in sf_readf_short()
458 memcpy_to_i16_from_p24(ptr, (const uint8_t *) temp, actualFrames * handle->info.channels); in sf_readf_short()
462 memset(ptr, 0, actualFrames * handle->info.channels * sizeof(short)); in sf_readf_short()
481 unsigned format = handle->info.format & SF_FORMAT_SUBMASK; in sf_readf_float()
495 actualFrames * handle->info.channels); in sf_readf_float()
500 memcpy_to_float_from_i16(ptr, (const short *) temp, actualFrames * handle->info.channels); in sf_readf_float()
504 memcpy_to_float_from_i32(ptr, (const int *) ptr, actualFrames * handle->info.channels); in sf_readf_float()
509 memcpy_to_float_from_p24(ptr, (const uint8_t *) temp, actualFrames * handle->info.channels); in sf_readf_float()
513 memset(ptr, 0, actualFrames * handle->info.channels * sizeof(float)); in sf_readf_float()
531 unsigned format = handle->info.format & SF_FORMAT_SUBMASK; in sf_readf_int()
546 actualFrames * handle->info.channels); in sf_readf_int()
551 memcpy_to_i32_from_i16(ptr, (const short *) temp, actualFrames * handle->info.channels); in sf_readf_int()
557 memcpy_to_i32_from_float(ptr, (const float *) ptr, actualFrames * handle->info.channels); in sf_readf_int()
560 memcpy_to_i32_from_p24(ptr, (const uint8_t *) temp, actualFrames * handle->info.channels); in sf_readf_int()
564 memset(ptr, 0, actualFrames * handle->info.channels * sizeof(int)); in sf_readf_int()
576 switch (handle->info.format & SF_FORMAT_SUBMASK) { in sf_writef_short()
589 my_swab((short *) handle->temp, desiredFrames * handle->info.channels); in sf_writef_short()
596 desiredFrames * handle->info.channels); in sf_writef_short()
613 switch (handle->info.format & SF_FORMAT_SUBMASK) { in sf_writef_float()
620 desiredFrames * handle->info.channels); in sf_writef_float()
638 switch (handle->info.format & SF_FORMAT_SUBMASK) { in sf_writef_int()