Lines Matching refs:au
40 #include <audio/au.h>
61 return (gettext("Unable to read au header"));
63 return (gettext("Unsupported au format"));
65 return (gettext("Bad au header"));
241 au_filehdr_t au;
244 if (read(h->bstr_fd, &au, sizeof (au)) != sizeof (au)) {
248 if (lseek(h->bstr_fd, (long)(BE32_TO_CPU(au.au_offset)),
390 au_filehdr_t *au;
394 au = NULL;
407 au = (au_filehdr_t *)my_zalloc(sizeof (*au));
408 if (read(fd, au, sizeof (*au)) != sizeof (*au)) {
412 au->au_magic = BE32_TO_CPU(au->au_magic);
413 au->au_offset = BE32_TO_CPU(au->au_offset);
414 au->au_data_size = BE32_TO_CPU(au->au_data_size);
415 au->au_encoding = BE32_TO_CPU(au->au_encoding);
416 au->au_sample_rate = BE32_TO_CPU(au->au_sample_rate);
417 au->au_channels = BE32_TO_CPU(au->au_channels);
419 if (au->au_magic != AUDIO_AU_FILE_MAGIC) {
423 if ((au->au_encoding != AUDIO_AU_ENCODING_LINEAR_16) ||
424 (au->au_sample_rate != 44100) || (au->au_channels != 2)) {
429 if (au->au_data_size != AUDIO_AU_UNKNOWN_SIZE) {
430 if ((au->au_offset + au->au_data_size) != st.st_size) {
434 data_size = au->au_data_size;
436 data_size = st.st_size - au->au_offset;
442 if (lseek(fd, au->au_offset, SEEK_SET) < 0) {
446 free(au);
460 if (au != NULL)
461 free(au);