Initial community commit
This commit is contained in:
parent
537bcbc862
commit
fc06254474
16440 changed files with 4239995 additions and 2 deletions
38
Src/Plugins/Input/in_wmvdrm/output/AudioOut.h
Normal file
38
Src/Plugins/Input/in_wmvdrm/output/AudioOut.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
#ifndef NULLSOFT_AUDIOOUTH
|
||||
#define NULLSOFT_AUDIOOUTH
|
||||
|
||||
#include <windows.h>
|
||||
#include "../../../../Winamp/out.h"
|
||||
|
||||
enum InitState
|
||||
{
|
||||
StatusNone = 0,
|
||||
StatusInit,
|
||||
StatusQuit
|
||||
};
|
||||
|
||||
class AudioOut
|
||||
{
|
||||
public:
|
||||
AudioOut() : dllInstance(0), winampWnd(NULL) {}
|
||||
virtual void Init() = 0;
|
||||
virtual void Quit() = 0;
|
||||
virtual int CanWrite() = 0;
|
||||
virtual int GetWrittenTime() = 0;
|
||||
virtual int IsPlaying() = 0;
|
||||
virtual int Open(int samplerate, int numchannels, int bitspersamp, int bufferlenms, int prebufferms) = 0;
|
||||
virtual void Close() = 0;
|
||||
virtual int Write(char *buf, int len) = 0;
|
||||
virtual void Flush(int t) = 0;
|
||||
virtual void SetVolume(int _volume) = 0;
|
||||
virtual int Pause(int new_state) = 0;
|
||||
virtual int GetOutputTime() = 0;
|
||||
virtual void SetPan(int _pan) = 0;
|
||||
virtual void About(HWND p) = 0;
|
||||
virtual void Config(HWND w) = 0;
|
||||
|
||||
HINSTANCE dllInstance;
|
||||
HWND winampWnd;
|
||||
};
|
||||
|
||||
#endif
|
70
Src/Plugins/Input/in_wmvdrm/output/OutPlugin.cpp
Normal file
70
Src/Plugins/Input/in_wmvdrm/output/OutPlugin.cpp
Normal file
|
@ -0,0 +1,70 @@
|
|||
#include "OutPlugin.h"
|
||||
#include "../Winamp/In2.h"
|
||||
|
||||
#include "WMDRMModule.h"
|
||||
extern In_Module plugin;
|
||||
OutPlugin pluginOut;
|
||||
|
||||
OutPlugin::OutPlugin()
|
||||
{}
|
||||
|
||||
void OutPlugin::Init()
|
||||
{
|
||||
plugin.outMod->Init();
|
||||
}
|
||||
void OutPlugin::Quit()
|
||||
{
|
||||
plugin.outMod->Quit();
|
||||
}
|
||||
int OutPlugin::CanWrite()
|
||||
{
|
||||
return plugin.outMod->CanWrite();
|
||||
}
|
||||
int OutPlugin::GetWrittenTime()
|
||||
{
|
||||
return plugin.outMod->GetWrittenTime();
|
||||
}
|
||||
int OutPlugin::IsPlaying()
|
||||
{
|
||||
return plugin.outMod->IsPlaying();
|
||||
}
|
||||
int OutPlugin::Open(int samplerate, int numchannels, int bitspersamp, int bufferlenms, int prebufferms)
|
||||
{
|
||||
return plugin.outMod->Open(samplerate, numchannels, bitspersamp, bufferlenms, prebufferms);
|
||||
}
|
||||
void OutPlugin::Close()
|
||||
{
|
||||
plugin.outMod->Close();
|
||||
}
|
||||
int OutPlugin::Write(char *buf, int len)
|
||||
{
|
||||
return plugin.outMod->Write(buf, len);
|
||||
}
|
||||
void OutPlugin::Flush(int t)
|
||||
{
|
||||
plugin.outMod->Flush(t);
|
||||
}
|
||||
void OutPlugin::SetVolume(int _volume)
|
||||
{
|
||||
plugin.outMod->SetVolume(_volume);
|
||||
}
|
||||
int OutPlugin::Pause(int new_state)
|
||||
{
|
||||
return plugin.outMod->Pause(new_state);
|
||||
}
|
||||
int OutPlugin::GetOutputTime()
|
||||
{
|
||||
return plugin.outMod->GetOutputTime();
|
||||
}
|
||||
void OutPlugin::SetPan(int _pan)
|
||||
{
|
||||
plugin.outMod->SetPan(_pan);
|
||||
}
|
||||
void OutPlugin::About(HWND p)
|
||||
{
|
||||
plugin.outMod->About(p);
|
||||
}
|
||||
void OutPlugin::Config(HWND w)
|
||||
{
|
||||
plugin.outMod->Config(w);
|
||||
}
|
28
Src/Plugins/Input/in_wmvdrm/output/OutPlugin.h
Normal file
28
Src/Plugins/Input/in_wmvdrm/output/OutPlugin.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
#ifndef NULLSOFT_OUTPLUGINH
|
||||
#define NULLSOFT_OUTPLUGINH
|
||||
|
||||
#include "AudioOut.h"
|
||||
|
||||
class OutPlugin : public AudioOut
|
||||
{
|
||||
public:
|
||||
OutPlugin();
|
||||
void Init();
|
||||
void Quit();
|
||||
int CanWrite();
|
||||
int GetWrittenTime();
|
||||
int IsPlaying();
|
||||
int Open(int samplerate, int numchannels, int bitspersamp, int bufferlenms, int prebufferms);
|
||||
void Close();
|
||||
int Write(char *buf, int len);
|
||||
void Flush(int t);
|
||||
void SetVolume(int _volume);
|
||||
int Pause(int new_state);
|
||||
int GetOutputTime();
|
||||
void SetPan(int _pan);
|
||||
void About(HWND p);
|
||||
void Config(HWND w);
|
||||
};
|
||||
|
||||
extern OutPlugin pluginOut;
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue