mirror of https://github.com/odrling/Aegisub
This should have gone into r5269: These files were re-licensed with permission of the original author. (Karl Blomster).
Originally committed to SVN as r5270.
This commit is contained in:
parent
1219b069b1
commit
cacc3516c1
|
@ -39,7 +39,7 @@ Audio::Audio(std::string filename)
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
HRESULT res;
|
HRESULT res;
|
||||||
res = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
res = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||||
if (SUCCEEDED(res))
|
if (SUCCEEDED(res))
|
||||||
COMInited = true;
|
COMInited = true;
|
||||||
else if (res != RPC_E_CHANGED_MODE)
|
else if (res != RPC_E_CHANGED_MODE)
|
||||||
throw AudioOpenError("COM initialization failure");
|
throw AudioOpenError("COM initialization failure");
|
||||||
|
@ -128,7 +128,7 @@ void Audio::LoadAudio(std::string filename) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// no valid index exists and the file only has one audio track, index it
|
// no valid index exists and the file only has one audio track, index it
|
||||||
else if (TrackNumber < 0)
|
else if (TrackNumber < 0)
|
||||||
TrackNumber = FFMS_TRACKMASK_ALL;
|
TrackNumber = FFMS_TRACKMASK_ALL;
|
||||||
// else: do nothing (keep track mask as it is)
|
// else: do nothing (keep track mask as it is)
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,8 @@
|
||||||
|
|
||||||
namespace ffms {
|
namespace ffms {
|
||||||
|
|
||||||
|
/// @class Audio
|
||||||
|
/// Audio file support.
|
||||||
class Audio {
|
class Audio {
|
||||||
FFMS_AudioSource *AudioSource; ///< audio source object
|
FFMS_AudioSource *AudioSource; ///< audio source object
|
||||||
bool COMInited; ///< COM initialization state
|
bool COMInited; ///< COM initialization state
|
||||||
|
|
Loading…
Reference in New Issue