# include "config.h"
#endif
-#include <stdio.h>
#include <math.h>
-#include <wchar.h>
#define UNICODE
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_aout.h>
-#include <vlc_charset.h> /* FromWide() */
-#include <vlc_atomic.h>
+#include <vlc_charset.h> /* FromWide() */
-#include "windows_audio_common.h"
+#include "audio_output/windows_audio_common.h"
#define FRAME_SIZE 4096 /* The size is in samples, not in bytes */
#define DEVICE_LONG N_("Select special Audio device, or let windows "\
"decide (default), change needs VLC restart "\
"to apply.")
-#define DEFAULT_AUDIO_DEVICE N_("Default Audio Device")
#define AUDIO_CHAN_TEXT N_("Audio output channels")
#define AUDIO_CHAN_LONGTEXT N_("Channels available for audio output. " \
vlc_module_begin ()
set_shortname( "WaveOut" )
- set_description( N_("Win32 waveOut extension output") )
+ set_description( N_("WaveOut audio output") )
set_capability( "audio output", 50 )
set_category( CAT_AUDIO )
set_subcategory( SUBCAT_AUDIO_AOUT )
add_float( "waveout-volume", 1.0f, VOLUME_TEXT, NULL, true )
change_float_range(0.0f, 2.0f)
add_bool( "waveout-float32", true, FLOAT_TEXT, FLOAT_LONGTEXT, true )
- add_integer ("waveout-audio-channels", 6, AUDIO_CHAN_TEXT,
+ add_integer ("waveout-audio-channels", 9, AUDIO_CHAN_TEXT,
AUDIO_CHAN_LONGTEXT, false)
- change_integer_range(1,6)
+ change_integer_range(1,9)
set_callbacks( Open, Close )
vlc_module_end ()
/* Default behaviour is to use software gain */
p_aout->sys->b_soft = true;
- /*
- check for configured audio device!
- */
- fmt->i_format = var_InheritBool( p_aout, "waveout-float32" )?
- VLC_CODEC_FL32: VLC_CODEC_S16N;
-
char *dev = var_GetNonEmptyString( p_aout, "waveout-audio-device");
uint32_t devid = findDeviceID( dev );
if( fmt->i_format != VLC_CODEC_SPDIFL )
{
+ /*
+ check for configured audio device!
+ */
+ fmt->i_format = var_InheritBool( p_aout, "waveout-float32" )?
+ VLC_CODEC_FL32: VLC_CODEC_S16N;
+
int max_chan = var_InheritInteger( p_aout, "waveout-audio-channels");
int i_channels = aout_FormatNbChannels(fmt);
i_channels = ( i_channels < max_chan )? i_channels: max_chan;
{
switch(i_channels)
{
+ case 9:
+ fmt->i_physical_channels = AOUT_CHANS_8_1;
+ break;
+ case 8:
+ fmt->i_physical_channels = AOUT_CHANS_7_1;
+ break;
+ case 7:
+ fmt->i_physical_channels = AOUT_CHANS_7_0;
+ break;
case 6:
fmt->i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT
| AOUT_CHAN_CENTER | AOUT_CHAN_REARLEFT
waveformat.Samples.wValidBitsPerSample);
msg_Dbg( p_aout,"waveformat.Samples.wSamplesPerBlock = %d",
waveformat.Samples.wSamplesPerBlock);
- msg_Dbg( p_aout,"waveformat.dwChannelMask = %lx",
+ msg_Dbg( p_aout,"waveformat.dwChannelMask = %u",
waveformat.dwChannelMask);
}