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 ...@@ -41,3 +41,4 @@ app/VLC_WINRT.sln.DotSettings
vlc/plugins/plugins.dat vlc/plugins/plugins.dat
app/ui/plugins/access/libaccess_winrt_plugin.dll app/ui/plugins/access/libaccess_winrt_plugin.dll
app/ui/plugins/video_output/libdirect2d_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 @@ ...@@ -161,6 +161,7 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
</AppxManifest> </AppxManifest>
<None Include="Common\ReadMe.txt" /> <None Include="Common\ReadMe.txt" />
<Content Include="plugins\audio_output\libxaudio2_winrt_plugin.dll" />
<Content Include="segoeui.ttf" /> <Content Include="segoeui.ttf" />
<PRIResource Include="Strings\en-US\Resources.resw" /> <PRIResource Include="Strings\en-US\Resources.resw" />
</ItemGroup> </ItemGroup>
...@@ -272,9 +273,6 @@ ...@@ -272,9 +273,6 @@
<Content Include="..\..\vlc\plugins\audio_mixer\libinteger_mixer_plugin.dll"> <Content Include="..\..\vlc\plugins\audio_mixer\libinteger_mixer_plugin.dll">
<Link>plugins\audio_mixer\libinteger_mixer_plugin.dll</Link> <Link>plugins\audio_mixer\libinteger_mixer_plugin.dll</Link>
</Content> </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"> <Content Include="..\..\vlc\plugins\codec\liba52_plugin.dll">
<Link>plugins\codec\liba52_plugin.dll</Link> <Link>plugins\codec\liba52_plugin.dll</Link>
</Content> </Content>
...@@ -482,9 +480,6 @@ ...@@ -482,9 +480,6 @@
<Content Include="..\..\vlc\plugins\stream_filter\libsmooth_plugin.dll"> <Content Include="..\..\vlc\plugins\stream_filter\libsmooth_plugin.dll">
<Link>plugins\stream_filter\libsmooth_plugin.dll</Link> <Link>plugins\stream_filter\libsmooth_plugin.dll</Link>
</Content> </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"> <Content Include="..\..\vlc\plugins\video_chroma\libgrey_yuv_plugin.dll">
<Link>plugins\video_chroma\libgrey_yuv_plugin.dll</Link> <Link>plugins\video_chroma\libgrey_yuv_plugin.dll</Link>
</Content> </Content>
...@@ -715,6 +710,7 @@ ...@@ -715,6 +710,7 @@
<Folder Include="plugins\meta_engine\" /> <Folder Include="plugins\meta_engine\" />
<Folder Include="plugins\packetizer\" /> <Folder Include="plugins\packetizer\" />
<Folder Include="plugins\services_discovery\" /> <Folder Include="plugins\services_discovery\" />
<Folder Include="plugins\text_renderer\" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<SDKReference Include="Microsoft.VCLibs, Version=11.0"> <SDKReference Include="Microsoft.VCLibs, Version=11.0">
......
...@@ -55,6 +55,7 @@ using namespace Windows::UI::Core; ...@@ -55,6 +55,7 @@ using namespace Windows::UI::Core;
static int Open(vlc_object_t *); static int Open(vlc_object_t *);
static void Close(vlc_object_t *); static void Close(vlc_object_t *);
vlc_module_begin() vlc_module_begin()
set_description(N_("XAudio2 audio output")) set_description(N_("XAudio2 audio output"))
set_shortname(N_("XAudio2")) set_shortname(N_("XAudio2"))
...@@ -69,6 +70,15 @@ vlc_module_end() ...@@ -69,6 +70,15 @@ vlc_module_end()
/***************************************************************************** /*****************************************************************************
* Local prototypes * 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 aout_sys_t
{ {
struct struct
...@@ -92,6 +102,15 @@ static int Open(vlc_object_t *object) ...@@ -92,6 +102,15 @@ static int Open(vlc_object_t *object)
if (!sys) if (!sys)
return VLC_ENOMEM; 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; return VLC_SUCCESS;
} }
...@@ -101,3 +120,27 @@ static void Close(vlc_object_t * object){ ...@@ -101,3 +120,27 @@ static void Close(vlc_object_t * object){
return; 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 @@ ...@@ -123,6 +123,9 @@
<AdditionalDependencies>runtimeobject.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>runtimeobject.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
</Link> </Link>
<PostBuildEvent>
<Command>copy /Y $(TargetPath) $(SolutionDir)\ui\plugins\audio_output</Command>
</PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile> <ClCompile>
......
...@@ -48,19 +48,6 @@ IAsyncAction^ Player::Initialize() ...@@ -48,19 +48,6 @@ IAsyncAction^ Player::Initialize()
void Player::InitializeVLC() 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]; char ptr_d2dstring[40];
sprintf_s(ptr_d2dstring, "--winrt-d2dcontext=0x%p", p_dxManager->cp_d2dContext); sprintf_s(ptr_d2dstring, "--winrt-d2dcontext=0x%p", p_dxManager->cp_d2dContext);
...@@ -85,9 +72,7 @@ void Player::InitializeVLC() ...@@ -85,9 +72,7 @@ void Player::InitializeVLC()
ptr_scstring, ptr_scstring,
widthstring, widthstring,
heightstring, heightstring,
"--aout=mmdevice", "--no-avcodec-dr",
ptr_astring,
"--avcodec-fast",
//"--freetype-font=segoeui.ttf" //"--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