PonyTracker
Un projet de tracker de musique
 Tout Structures de données Espaces de nommage Fichiers Fonctions Variables Définitions de type Énumérations Valeurs énumérées Macros Pages
fmod_output.h
Aller à la documentation de ce fichier.
1 /* ==================================================================================================== */
2 /* FMOD Ex - output development header file. Copyright (c), Firelight Technologies Pty, Ltd. 2004-2014. */
3 /* */
4 /* Use this header if you are wanting to develop your own output plugin to use with */
5 /* FMOD's output system. With this header you can make your own output plugin that FMOD */
6 /* can register and use. See the documentation and examples on how to make a working plugin. */
7 /* */
8 /* ==================================================================================================== */
9 
10 #ifndef _FMOD_OUTPUT_H
11 #define _FMOD_OUTPUT_H
12 
13 #include "fmod.h"
14 
16 
17 /*
18  Output callbacks
19 */
21 typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_GETDRIVERNAMECALLBACK)(FMOD_OUTPUT_STATE *output_state, int id, char *name, int namelen);
24 typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_CLOSECALLBACK) (FMOD_OUTPUT_STATE *output_state);
25 typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_UPDATECALLBACK) (FMOD_OUTPUT_STATE *output_state);
26 typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_GETHANDLECALLBACK) (FMOD_OUTPUT_STATE *output_state, void **handle);
27 typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_GETPOSITIONCALLBACK) (FMOD_OUTPUT_STATE *output_state, unsigned int *pcm);
28 typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_LOCKCALLBACK) (FMOD_OUTPUT_STATE *output_state, unsigned int offset, unsigned int length, void **ptr1, void **ptr2, unsigned int *len1, unsigned int *len2);
29 typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_UNLOCKCALLBACK) (FMOD_OUTPUT_STATE *output_state, void *ptr1, void *ptr2, unsigned int len1, unsigned int len2);
30 typedef FMOD_RESULT (F_CALLBACK *FMOD_OUTPUT_READFROMMIXER) (FMOD_OUTPUT_STATE *output_state, void *buffer, unsigned int length);
31 
32 
33 /*
34 [STRUCTURE]
35 [
36  [DESCRIPTION]
37  When creating an output, declare one of these and provide the relevant callbacks and name for FMOD to use when it opens and reads a file of this type.
38 
39  [REMARKS]
40  Members marked with [in] mean the variable can be written to. The user can set the value.<br>
41  Members marked with [out] mean the variable is modified by FMOD and is for reading purposes only. Do not change this value.<br>
42 
43  [PLATFORMS]
44  Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
45 
46  [SEE_ALSO]
47  FMOD_OUTPUT_STATE
48 ]
49 */
51 {
52  const char *name; /* [in] Name of the output. */
53  unsigned int version; /* [in] Plugin writer's version number. */
54  int polling; /* [in] If TRUE (non zero), this tells FMOD to start a thread and call getposition / lock / unlock for feeding data. If 0, the output is probably callback based, so all the plugin needs to do is call readfrommixer to the appropriate pointer. */
55  FMOD_OUTPUT_GETNUMDRIVERSCALLBACK getnumdrivers; /* [in] For sound device enumeration. This callback is to give System::getNumDrivers somthing to return. */
56  FMOD_OUTPUT_GETDRIVERNAMECALLBACK getdrivername; /* [in] For sound device enumeration. This callback is to give System::getDriverName somthing to return. */
57  FMOD_OUTPUT_GETDRIVERCAPSCALLBACK getdrivercaps; /* [in] For sound device enumeration. This callback is to give System::getDriverCaps somthing to return. */
58  FMOD_OUTPUT_INITCALLBACK init; /* [in] Initialization function for the output device. This is called from System::init. */
59  FMOD_OUTPUT_CLOSECALLBACK close; /* [in] Cleanup / close down function for the output device. This is called from System::close. */
60  FMOD_OUTPUT_UPDATECALLBACK update; /* [in] Update function that is called once a frame by the user. This is called from System::update. */
61  FMOD_OUTPUT_GETHANDLECALLBACK gethandle; /* [in] This is called from System::getOutputHandle. This is just to return a pointer to the internal system device object that the system may be using.*/
62  FMOD_OUTPUT_GETPOSITIONCALLBACK getposition; /* [in] This is called from the FMOD software mixer thread if 'polling' = true. This returns a position value in samples so that FMOD knows where and when to fill its buffer. */
63  FMOD_OUTPUT_LOCKCALLBACK lock; /* [in] This is called from the FMOD software mixer thread if 'polling' = true. This function provides a pointer to data that FMOD can write to when software mixing. */
64  FMOD_OUTPUT_UNLOCKCALLBACK unlock; /* [in] This is called from the FMOD software mixer thread if 'polling' = true. This optional function accepts the data that has been mixed and copies it or does whatever it needs to before sending it to the hardware. */
66 
67 
68 /*
69 [STRUCTURE]
70 [
71  [DESCRIPTION]
72  Output plugin structure that is passed into each callback.
73 
74  [REMARKS]
75  Members marked with [in] mean the variable can be written to. The user can set the value.<br>
76  Members marked with [out] mean the variable is modified by FMOD and is for reading purposes only. Do not change this value.<br>
77 
78  [PLATFORMS]
79  Win32, Win64, Linux, Linux64, Macintosh, Xbox360, PlayStation Portable, PlayStation 3, Wii, iPhone, 3GS, NGP, Android
80 
81  [SEE_ALSO]
82  FMOD_OUTPUT_DESCRIPTION
83 ]
84 */
86 {
87  void *plugindata; /* [in] Plugin writer created data the output author wants to attach to this object. */
88  FMOD_OUTPUT_READFROMMIXER readfrommixer; /* [out] Function to update mixer and write the result to the provided pointer. Used from callback based output only. Polling based output uses lock/unlock/getposition. */
89 };
90 
91 #endif
92 
93 
FMOD_SOUND_FORMAT
Definition: fmod.h:826
FMOD_RESULT(F_CALLBACK * FMOD_OUTPUT_GETNUMDRIVERSCALLBACK)(FMOD_OUTPUT_STATE *output_state, int *numdrivers)
Definition: fmod_output.h:20
unsigned int FMOD_INITFLAGS
Definition: fmod.h:77
FMOD_OUTPUT_GETHANDLECALLBACK gethandle
Definition: fmod_output.h:61
void * buffer
Definition: fmod_output.h:30
FMOD_TAGTYPE char * name
Definition: fmod_codec.h:26
int FMOD_INITFLAGS flags
Definition: fmod_output.h:23
unsigned int unsigned int void void unsigned int unsigned int * len2
Definition: fmod_output.h:28
unsigned int version
Definition: fmod_output.h:53
FMOD_RESULT(F_CALLBACK * FMOD_OUTPUT_GETDRIVERNAMECALLBACK)(FMOD_OUTPUT_STATE *output_state, int id, char *name, int namelen)
Definition: fmod_output.h:21
void ** handle
Definition: fmod_output.h:26
typedef FMOD_RESULT(F_CALLBACK *FMOD_OUTPUT_INITCALLBACK)(FMOD_OUTPUT_STATE *output_state
unsigned int FMOD_CAPS
Definition: fmod.h:78
int FMOD_INITFLAGS int int outputchannels
Definition: fmod_output.h:23
FMOD_OUTPUT_GETDRIVERCAPSCALLBACK getdrivercaps
Definition: fmod_output.h:57
unsigned int * pcm
Definition: fmod_output.h:27
FMOD_OUTPUT_UNLOCKCALLBACK unlock
Definition: fmod_output.h:64
unsigned int unsigned int void ** ptr1
Definition: fmod_output.h:28
int FMOD_INITFLAGS int int FMOD_SOUND_FORMAT int int dspnumbuffers
Definition: fmod_output.h:23
FMOD_RESULT(F_CALLBACK * FMOD_OUTPUT_GETDRIVERCAPSCALLBACK)(FMOD_OUTPUT_STATE *output_state, int id, FMOD_CAPS *caps)
Definition: fmod_output.h:22
FMOD_OUTPUT_CLOSECALLBACK close
Definition: fmod_output.h:59
unsigned int unsigned int length
Definition: fmod_output.h:28
FMOD_OUTPUT_GETDRIVERNAMECALLBACK getdrivername
Definition: fmod_output.h:56
unsigned int offset
Definition: fmod_output.h:28
FMOD_OUTPUT_LOCKCALLBACK lock
Definition: fmod_output.h:63
FMOD_OUTPUT_GETNUMDRIVERSCALLBACK getnumdrivers
Definition: fmod_output.h:55
struct FMOD_OUTPUT_DESCRIPTION FMOD_OUTPUT_DESCRIPTION
int FMOD_INITFLAGS int int FMOD_SOUND_FORMAT int int void * extradriverdata
Definition: fmod_output.h:23
FMOD_OUTPUT_UPDATECALLBACK update
Definition: fmod_output.h:60
unsigned int unsigned int void void unsigned int * len1
Definition: fmod_output.h:28
unsigned int unsigned int void void ** ptr2
Definition: fmod_output.h:28
FMOD_OUTPUT_INITCALLBACK init
Definition: fmod_output.h:58
FMOD_OUTPUT_GETPOSITIONCALLBACK getposition
Definition: fmod_output.h:62
int FMOD_INITFLAGS int int FMOD_SOUND_FORMAT * outputformat
Definition: fmod_output.h:23
int FMOD_INITFLAGS int int FMOD_SOUND_FORMAT int dspbufferlength
Definition: fmod_output.h:23
int FMOD_INITFLAGS int * outputrate
Definition: fmod_output.h:23
#define F_CALLBACK
Definition: fmod.h:57
FMOD_OUTPUT_READFROMMIXER readfrommixer
Definition: fmod_output.h:88
int selecteddriver
Definition: fmod_output.h:23