aboutsummaryrefslogtreecommitdiff
path: root/Src/Plugins/Input/in_wmvdrm/AudioThread.h
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Plugins/Input/in_wmvdrm/AudioThread.h')
-rw-r--r--Src/Plugins/Input/in_wmvdrm/AudioThread.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/Src/Plugins/Input/in_wmvdrm/AudioThread.h b/Src/Plugins/Input/in_wmvdrm/AudioThread.h
new file mode 100644
index 00000000..4192d604
--- /dev/null
+++ b/Src/Plugins/Input/in_wmvdrm/AudioThread.h
@@ -0,0 +1,40 @@
+#ifndef NULLSOFT_AUDIOTHREADH
+#define NULLSOFT_AUDIOTHREADH
+
+#include "WMHandler.h"
+#include "MediaThread.h"
+#include <wmsdk.h>
+
+class AudioLayer;
+
+class AudioThread : public MediaThread
+{
+public:
+ AudioThread(AudioLayer *audio);
+ void Start(WMHandler *output);
+
+ /* AddBuffers put an audio buffer in the queue
+ it returns true if it was added
+ it returns false if it was NOT added. it is up to YOU (the caller) to sleep for a while and call again
+ */
+ void AudThread();
+ bool EndOfFile()
+ {
+ if (buffers.empty()) // if the buffers are empty, then our thread might never get a chance to signal EOF
+ return true;
+
+ if (eof)
+ return true;
+ eof=1;
+
+ return false;
+ }
+
+private:
+ void AddAPC(MediaBuffer *);
+ int eof;
+ WMHandler *output;
+ AudioLayer *audioLayer;
+
+};
+#endif \ No newline at end of file