1 /* sound-nas.c - play a sound over NAS
3 Copyright (C) 2006 Sebastian Freundt
5 This file is part of SXEmacs
7 SXEmacs is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 SXEmacs is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
21 /* Synched up with: Not in FSF. */
23 /* based largely on the ao_nas mplayer plugin by Tobias Diedrich */
25 #ifndef INCLUDED_sound_nas_h_
26 #define INCLUDED_sound_nas_h_
29 #include <audio/audiolib.h>
31 #define NAS_FRAG_SIZE 4096
33 typedef struct sound_nas_data_s sound_nas_data_t;
34 typedef struct sound_nas_aj_data_s sound_nas_aj_data_t;
36 struct sound_nas_data_s {
38 size_t proposed_buffer_size;
41 struct sound_nas_aj_data_s {
42 sound_nas_data_t *snd;
47 size_t samplerate; /* rate used on the device */
48 unsigned int channels; /* channels used on the device */
49 unsigned int framesize;
54 media_sample_format_t *msf;
56 audio_coerce_chain_t coe_chain[4];
57 mtype_audio_properties *mtap;
58 sxe_mse_volume_args *volargs;
59 sxe_mse_rerate_args *rrargs;
67 media_thread_play_state mtp;
70 extern void nas_wait_for_sounds(void);
72 extern Lisp_Object Qnas; /* initialised in sound.c */
74 DECLARE_AUDIO_DEVICE(sound_nas);
76 #ifdef ALL_DEBUG_FLAGS
78 #define NAS_DEBUG_FLAG
81 #endif /* INCLUDED_sound_nas_h_ */