#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/soundcard.h>
#include <sys/ioctl.h>
#include <linux/soundcard.h>
#include <libdv/dv.h>
#include "xdvshow-audio.h"
Include dependency graph for xdvshow-audio.c:
Go to the source code of this file.
Functions | |
int _init_audio_device | __P ((dv_audio_t *)) |
int | xdvshow_init_audio (char *audio_dev, dv_audio_t *audio) |
Public interface for _init_audio_device fuction. | |
int | xdvshow_play_audio (dv_audio_t *audio, int16_t **audio_buffers) |
Audio playing function. | |
int | _init_audio_device (dv_audio_t *audio) |
This is the internal audio initialization fuction. | |
Variables | |
int | audio_fd |
is the audio device file descriptor. |
|
|
|
This is the internal audio initialization fuction. Function has its own parts for Linux and FreeBSD. Perhaps the initialization code should be the same for both systems. Anyway it's necessary to set the endianity, number of channels and sampling rate. These values must be set strictly in this order to intialize the audio properly.
Definition at line 155 of file xdvshow-audio.c. References audio_fd. Referenced by xdvshow_init_audio().
|
|
Public interface for _init_audio_device fuction. xdvshow_init_audio opens given audio device and then calls internal function _init_audio_device.
Definition at line 76 of file xdvshow-audio.c. References _init_audio_device(), and audio_fd. Referenced by main().
Here is the call graph for this function: ![]() |
|
Audio playing function. xdvshow_play_audio() just writes the previously decoded audio data to the audio device. The device must be initialized in advance by xdvshow_init_audio().
Definition at line 111 of file xdvshow-audio.c. References audio_buffers, and audio_fd. Referenced by audio_thread_func().
|
|
is the audio device file descriptor.
Definition at line 60 of file xdvshow-audio.c. Referenced by _init_audio_device(), xdvshow_init_audio(), and xdvshow_play_audio(). |