Files
Vocaluxe/GstreamerHelper/GstreamerAudio.h
T
Flamefire a4b1c3eb86 Unify playback libs with common base class
Remove duplicate code
Fix bugs in implementations (threading, logic)
Remove SetStreamVolumeMax and use SetGlobalVolume instead
2014-05-05 02:10:15 +02:00

50 lines
1.4 KiB
C++

#pragma once
#include <string>
#include <map>
#include <queue>
#include "gst/gst.h"
#include "GstreamerAudioStream.h"
#include "gst\gst.h"
#define DllExport extern "C" __declspec(dllexport)
using namespace std;
typedef void (__stdcall * LogCallback)(const char* text);
static LogCallback Log;
DllExport void SetLogCallback(LogCallback Callback);
DllExport bool Init();
DllExport void SetGlobalVolume(float Volume);
DllExport float GetGlobalVolume();
DllExport int GetStreamCount(void);
DllExport void CloseAll(void);
//Stream handling
DllExport int Load(const wchar_t* Media);
DllExport int LoadPrescan(const wchar_t* Media, bool Prescan);
DllExport void Close(int Stream);
DllExport void Play(int Stream);
DllExport void PlayLoop(int Stream, bool Loop);
DllExport void Pause(int Stream);
DllExport void Stop(int Stream);
DllExport void Fade(int Stream, float TargetVolume, float Seconds);
DllExport void FadeAndPause(int Stream, float TargetVolume, float Seconds);
DllExport void FadeAndStop(int Stream, float TargetVolume, float Seconds);
DllExport void SetStreamVolume(int Stream, float Volume);
DllExport float GetLength(int Stream);
DllExport float GetPosition(int Stream);
DllExport bool IsPlaying(int Stream);
DllExport bool IsPaused(int Stream);
DllExport bool IsFinished(int Stream);
DllExport void SetPosition(int Stream, float Position);
DllExport void Update();
void LogError(const char* msg);