Commit d8ef28b3 authored by Kellen Sunderland's avatar Kellen Sunderland

Audio module actually starting

parent 32b41af1
......@@ -41,3 +41,4 @@ app/VLC_WINRT.sln.DotSettings
vlc/plugins/plugins.dat
app/ui/plugins/access/libaccess_winrt_plugin.dll
app/ui/plugins/video_output/libdirect2d_winrt_plugin.dll
app/ui/plugins/audio_output/libxaudio2_winrt_plugin.dll
......@@ -161,6 +161,7 @@
<SubType>Designer</SubType>
</AppxManifest>
<None Include="Common\ReadMe.txt" />
<Content Include="plugins\audio_output\libxaudio2_winrt_plugin.dll" />
<Content Include="segoeui.ttf" />
<PRIResource Include="Strings\en-US\Resources.resw" />
</ItemGroup>
......@@ -272,9 +273,6 @@
<Content Include="..\..\vlc\plugins\audio_mixer\libinteger_mixer_plugin.dll">
<Link>plugins\audio_mixer\libinteger_mixer_plugin.dll</Link>
</Content>
<Content Include="..\..\vlc\plugins\audio_output\libmmdevice_plugin.dll">
<Link>plugins\audio_output\libmmdevice_plugin.dll</Link>
</Content>
<Content Include="..\..\vlc\plugins\codec\liba52_plugin.dll">
<Link>plugins\codec\liba52_plugin.dll</Link>
</Content>
......@@ -482,9 +480,6 @@
<Content Include="..\..\vlc\plugins\stream_filter\libsmooth_plugin.dll">
<Link>plugins\stream_filter\libsmooth_plugin.dll</Link>
</Content>
<Content Include="..\..\vlc\plugins\text_renderer\libtdummy_plugin.dll">
<Link>plugins\text_renderer\libtdummy_plugin.dll</Link>
</Content>
<Content Include="..\..\vlc\plugins\video_chroma\libgrey_yuv_plugin.dll">
<Link>plugins\video_chroma\libgrey_yuv_plugin.dll</Link>
</Content>
......@@ -715,6 +710,7 @@
<Folder Include="plugins\meta_engine\" />
<Folder Include="plugins\packetizer\" />
<Folder Include="plugins\services_discovery\" />
<Folder Include="plugins\text_renderer\" />
</ItemGroup>
<ItemGroup>
<SDKReference Include="Microsoft.VCLibs, Version=11.0">
......
......@@ -55,6 +55,7 @@ using namespace Windows::UI::Core;
static int Open(vlc_object_t *);
static void Close(vlc_object_t *);
vlc_module_begin()
set_description(N_("XAudio2 audio output"))
set_shortname(N_("XAudio2"))
......@@ -69,6 +70,15 @@ vlc_module_end()
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static int Start(audio_output_t *p_aout, audio_sample_format_t *__restrict fmt);
static void Stop(audio_output_t *);
static void Play(audio_output_t *, block_t *);
static int MuteSet(audio_output_t *, bool);
static void Flush(audio_output_t *, bool);
static void Pause(audio_output_t *, bool, mtime_t);
static int VolumeSet(audio_output_t *p_aout, float volume);
//static int TimeGet(audio_output_t *, mtime_t *);
struct aout_sys_t
{
struct
......@@ -92,6 +102,15 @@ static int Open(vlc_object_t *object)
if (!sys)
return VLC_ENOMEM;
aout->start = Start;
aout->stop = Stop;
aout->volume_set = VolumeSet;
aout->mute_set = MuteSet;
aout->pause = Pause;
aout->play = Play;
aout->flush = Flush;
aout->time_get = NULL;
return VLC_SUCCESS;
}
......@@ -101,3 +120,27 @@ static void Close(vlc_object_t * object){
return;
}
static int Start(audio_output_t *p_aout, audio_sample_format_t *__restrict fmt){
aout_sys_t *aout = p_aout->sys;
return VLC_SUCCESS;
};
static void Stop(audio_output_t *){
return;
}
static void Play(audio_output_t *, block_t *){
return;
}
static int MuteSet(audio_output_t *, bool){
return VLC_SUCCESS;
}
static void Flush(audio_output_t *, bool){
return;
}
static void Pause(audio_output_t *, bool, mtime_t){
return;
}
static int VolumeSet(audio_output_t *p_aout, float volume){
return VLC_SUCCESS;
}
\ No newline at end of file
......@@ -123,6 +123,9 @@
<AdditionalDependencies>runtimeobject.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
</Link>
<PostBuildEvent>
<Command>copy /Y $(TargetPath) $(SolutionDir)\ui\plugins\audio_output</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
......
......@@ -48,19 +48,6 @@ IAsyncAction^ Player::Initialize()
void Player::InitializeVLC()
{
ComPtr<MMDeviceLocator> audioReg = Make<MMDeviceLocator>();
audioReg->m_AudioClient = NULL;
audioReg->RegisterForWASAPI();
void *addr = NULL;
while (!WaitOnAddress(&audioReg->m_AudioClient, &addr, sizeof(void*), 1000)) {
OutputDebugStringW(L"Waiting for audio\n");
}
char ptr_astring[40];
sprintf_s(ptr_astring, "--mmdevice-audioclient=0x%p", audioReg->m_AudioClient);
char ptr_d2dstring[40];
sprintf_s(ptr_d2dstring, "--winrt-d2dcontext=0x%p", p_dxManager->cp_d2dContext);
......@@ -85,9 +72,7 @@ void Player::InitializeVLC()
ptr_scstring,
widthstring,
heightstring,
"--aout=mmdevice",
ptr_astring,
"--avcodec-fast",
"--no-avcodec-dr",
//"--freetype-font=segoeui.ttf"
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment