aboutsummaryrefslogtreecommitdiff
path: root/Src/replicant/ogg
diff options
context:
space:
mode:
Diffstat (limited to 'Src/replicant/ogg')
-rw-r--r--Src/replicant/ogg/api.h8
-rw-r--r--Src/replicant/ogg/ifc_oggaudiodecoder.h16
-rw-r--r--Src/replicant/ogg/svc_oggdecoder.h26
3 files changed, 50 insertions, 0 deletions
diff --git a/Src/replicant/ogg/api.h b/Src/replicant/ogg/api.h
new file mode 100644
index 00000000..16d89ca8
--- /dev/null
+++ b/Src/replicant/ogg/api.h
@@ -0,0 +1,8 @@
+#pragma once
+#include "../replicant/service/api_service.h"
+extern api_service *serviceManager;
+#define WASABI2_API_SVC serviceManager
+
+#include "../replicant/application/api_application.h"
+extern api_application *applicationApi;
+#define WASABI2_API_APP applicationApi
diff --git a/Src/replicant/ogg/ifc_oggaudiodecoder.h b/Src/replicant/ogg/ifc_oggaudiodecoder.h
new file mode 100644
index 00000000..cf228162
--- /dev/null
+++ b/Src/replicant/ogg/ifc_oggaudiodecoder.h
@@ -0,0 +1,16 @@
+#pragma once
+#include "../replicant/foundation/dispatch.h"
+
+class ifc_oggaudiodecoder : public Wasabi2::Dispatchable
+{
+protected:
+ ifc_oggaudiodecoder() : Dispatchable(DISPATCHABLE_VERSION) {}
+ ~ifc_oggaudiodecoder() {}
+public:
+
+ enum
+ {
+ DISPATCHABLE_VERSION,
+ GET_BPS
+ };
+}; \ No newline at end of file
diff --git a/Src/replicant/ogg/svc_oggdecoder.h b/Src/replicant/ogg/svc_oggdecoder.h
new file mode 100644
index 00000000..9c227fe3
--- /dev/null
+++ b/Src/replicant/ogg/svc_oggdecoder.h
@@ -0,0 +1,26 @@
+#pragma once
+#include "../replicant/foundation/dispatch.h"
+#include "ogg/ogg.h"
+#include "../replicant/ogg/ifc_oggaudiodecoder.h"
+#include "../replicant/foundation/error.h"
+
+// {EC953F63-DFD3-41E7-B893-92537AE88280}
+static const GUID ogg_decoder_service_type_guid =
+{ 0xec953f63, 0xdfd3, 0x41e7, { 0xb8, 0x93, 0x92, 0x53, 0x7a, 0xe8, 0x82, 0x80 } };
+
+class svc_oggdecoder : public Wasabi2::Dispatchable
+{
+protected:
+ svc_oggdecoder() : Dispatchable(DISPATCHABLE_VERSION) {}
+ ~svc_oggdecoder() {}
+public:
+ static GUID GetServiceType() { return ogg_decoder_service_type_guid; }
+ ns_error_t CreateAudioDecoder(ogg_packet *packet, ifc_oggaudiodecoder **audio_decoder) { return OggDecoder_CreateAudioDecoder(packet, audio_decoder); }
+
+ enum
+ {
+ DISPATCHABLE_VERSION,
+ };
+private:
+ virtual ns_error_t WASABICALL OggDecoder_CreateAudioDecoder(ogg_packet *packet, ifc_oggaudiodecoder **audio_decoder)=0;
+};