N64: Added a function to get the audio rate from the core.
This commit is contained in:
parent
0d556dc9e9
commit
533baf9ef3
|
@ -214,6 +214,9 @@ namespace BizHawk.Emulation.Consoles.Nintendo.N64
|
||||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||||
private delegate void ReadAudioBuffer(short[] dest);
|
private delegate void ReadAudioBuffer(short[] dest);
|
||||||
ReadAudioBuffer AudReadAudioBuffer;
|
ReadAudioBuffer AudReadAudioBuffer;
|
||||||
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||||
|
private delegate int GetAudioRate();
|
||||||
|
GetAudioRate AudGetAudioRate;
|
||||||
|
|
||||||
// This has the same calling pattern for all the plugins
|
// This has the same calling pattern for all the plugins
|
||||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||||
|
@ -288,6 +291,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo.N64
|
||||||
AudPluginStartup = (PluginStartup)Marshal.GetDelegateForFunctionPointer(GetProcAddress(AudDll, "PluginStartup"), typeof(PluginStartup));
|
AudPluginStartup = (PluginStartup)Marshal.GetDelegateForFunctionPointer(GetProcAddress(AudDll, "PluginStartup"), typeof(PluginStartup));
|
||||||
AudGetBufferSize = (GetBufferSize)Marshal.GetDelegateForFunctionPointer(GetProcAddress(AudDll, "GetBufferSize"), typeof(GetBufferSize));
|
AudGetBufferSize = (GetBufferSize)Marshal.GetDelegateForFunctionPointer(GetProcAddress(AudDll, "GetBufferSize"), typeof(GetBufferSize));
|
||||||
AudReadAudioBuffer = (ReadAudioBuffer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(AudDll, "ReadAudioBuffer"), typeof(ReadAudioBuffer));
|
AudReadAudioBuffer = (ReadAudioBuffer)Marshal.GetDelegateForFunctionPointer(GetProcAddress(AudDll, "ReadAudioBuffer"), typeof(ReadAudioBuffer));
|
||||||
|
AudGetAudioRate = (GetAudioRate)Marshal.GetDelegateForFunctionPointer(GetProcAddress(AudDll, "GetAudioRate"), typeof(GetAudioRate));
|
||||||
|
|
||||||
RspPluginStartup = (PluginStartup)Marshal.GetDelegateForFunctionPointer(GetProcAddress(RspDll, "PluginStartup"), typeof(PluginStartup));
|
RspPluginStartup = (PluginStartup)Marshal.GetDelegateForFunctionPointer(GetProcAddress(RspDll, "PluginStartup"), typeof(PluginStartup));
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -746,3 +746,8 @@ EXPORT int CALL GetBufferSize()
|
||||||
{
|
{
|
||||||
return buffer_pos/2;
|
return buffer_pos/2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EXPORT int CALL GetAudioRate()
|
||||||
|
{
|
||||||
|
return GameFreq;
|
||||||
|
}
|
Loading…
Reference in New Issue