comparison src/hpplay.c @ 274:ca9a9ec9c1c1 r21-0b35

Import from CVS: tag r21-0b35
author cvs
date Mon, 13 Aug 2007 10:29:42 +0200
parents c5d627a313b1
children b8cc9ab3f761
comparison
equal deleted inserted replaced
273:411aac7253ef 274:ca9a9ec9c1c1
26 PURPOSE 26 PURPOSE
27 Play .au sound files on hp9000s700 27 Play .au sound files on hp9000s700
28 BUGS 28 BUGS
29 I have been unable to figure out how to use the volume feature, so no 29 I have been unable to figure out how to use the volume feature, so no
30 attempts has been made to honor the volume arg of play_sound_* 30 attempts has been made to honor the volume arg of play_sound_*
31 This means that all sounds is played at 100%. 31 This means that all sounds are played at 100%.
32 The gain parameter can be set by using the play-gain variable. 32 The gain parameter can be set by using the hp-play-gain variable.
33 33
34 NOTES 34 NOTES
35 This file is mostly based on the player program found in the examples 35 This file is mostly based on the player program found in the examples
36 directory of the audio software delivered on our machines. The path I 36 directory of the audio software delivered on our machines. The path I
37 found it under was /usr/audio/examples/player.c 37 found it under was /usr/audio/examples/player.c
61 #include <audio/CUlib.h> 61 #include <audio/CUlib.h>
62 #endif /* !HPUX 10 */ 62 #endif /* !HPUX 10 */
63 63
64 Lisp_Object Vhp_play_server; 64 Lisp_Object Vhp_play_server;
65 Lisp_Object Vhp_play_speaker; 65 Lisp_Object Vhp_play_speaker;
66 int play_gain; 66 int hp_play_gain;
67 67
68 /* Functions */ 68 /* Functions */
69 69
70 /* error handling */ 70 /* error handling */
71 void player_error_internal( 71 void player_error_internal(
134 gainEntry.u.o.out_ch = AOCTMono; 134 gainEntry.u.o.out_ch = AOCTMono;
135 gainEntry.gain = AUnityGain; 135 gainEntry.gain = AUnityGain;
136 playParams.gain_matrix.type = AGMTOutput; /* gain matrix */ 136 playParams.gain_matrix.type = AGMTOutput; /* gain matrix */
137 playParams.gain_matrix.num_entries = 1; 137 playParams.gain_matrix.num_entries = 1;
138 playParams.gain_matrix.gain_entries = &gainEntry; 138 playParams.gain_matrix.gain_entries = &gainEntry;
139 playParams.play_volume = play_gain; /* play volume */ 139 playParams.play_volume = hp_play_gain; /* play volume */
140 playParams.pause_first = False; /* don't pause */ 140 playParams.pause_first = False; /* don't pause */
141 playParams.start_offset.type = ATTSamples; /* start offset 0 */ 141 playParams.start_offset.type = ATTSamples; /* start offset 0 */
142 playParams.start_offset.u.samples = 0; 142 playParams.start_offset.u.samples = 0;
143 playParams.duration.type = ATTFullLength; /* play entire sample */ 143 playParams.duration.type = ATTFullLength; /* play entire sample */
144 playParams.loop_count = 1; /* play sample just once */ 144 playParams.loop_count = 1; /* play sample just once */
271 not make your functions depend on it. 271 not make your functions depend on it.
272 */ ); 272 */ );
273 273
274 Vhp_play_speaker = intern ("internal"); 274 Vhp_play_speaker = intern ("internal");
275 275
276 DEFVAR_INT("hp-play-gain", &play_gain /* 276 DEFVAR_INT("hp-play-gain", &hp_play_gain /*
277 Global gain value for playing sounds. 277 Global gain value for playing sounds.
278 Default value is AUnityGain which means keep level. 278 Default value is AUnityGain which means keep level.
279 Please refer to the HP documentation, for instance in 279 Please refer to the HP documentation, for instance in
280 `Using the Audio Application Program Interface', for details on how to 280 `Using the Audio Application Program Interface', for details on how to
281 interpret this variable. 281 interpret this variable.
282 Note that this is specific to the HP sound implementation, and you should 282 Note that this is specific to the HP sound implementation, and you should
283 not make your functions depend on it. 283 not make your functions depend on it.
284 */ ); 284 */ );
285 285
286 play_gain = AUnityGain; 286 hp_play_gain = AUnityGain;
287 } 287 }
288 288
289 void 289 void
290 init_hpplay (void) 290 init_hpplay (void)
291 { 291 {