FmodEX working in Windows and Linux using VB.NET EXPRESS 2005.
Using mono-basic 1.2.3 download here.
Windows is OK create System and Version and StreamCreatFile.
Linux Open SUSE 10.2 is OK create System and Version…
more FMOD_System_CreateStreamEx action in Linux is problem… 😥
Does anybody know how to help?
[code:2gmw4v2y]Public Class Form1
Dim Result As FMODEx.FMOD_RESULT
Dim FmodSystem As Integer
Dim Version As Integer
Dim Sound As Integer
Dim Channel As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Result = FMODEx.FMOD_System_Create(FmodSystem) ListBox1.Items.Add("FmodSystem " & FmodSystem) Result = FMODEx.FMOD_System_GetVersion(FmodSystem, Version) ListBox1.Items.Add("Version " & Version) Result = FMODEx.FMOD_System_Init(FmodSystem, 1, FMODEx.FMOD_INITFLAGS.FMOD_INIT_NORMAL, 0) 'Result = FMODEx.FMOD_System_CreateSoundEx(FmodSystem, "./wave.mp3", FMODEx.FMOD_MODE.FMOD_HARDWARE, 0, Sound) 'Result = FMODEx.FMOD_System_PlaySound(FmodSystem, FMODEx.FMOD_CHANNELINDEX.FMOD_CHANNEL_FREE, Sound, 0, Channel) Result = FMODEx.FMOD_System_CreateStreamEx(FmodSystem, "./wave.mp3", (FMODEx.FMOD_MODE.FMOD_HARDWARE Or FMODEx.FMOD_MODE.FMOD_SOFTWARE), 0, Sound) Result = FMODEx.FMOD_System_PlaySound(FmodSystem, FMODEx.FMOD_CHANNELINDEX.FMOD_CHANNEL_FREE, Sound, 0, Channel) End Sub 'Public Function FMOD_System_CreateStream(ByVal FmodSystem As Integer, ByVal Name_or_data As String, ByVal Mode As FMODEx.FMOD_MODE, ByRef Sound As Integer) As FMODEx.FMOD_RESULT 'Dim exinfo As FMODEx.FMOD_CREATESOUNDEXINFO 'Dim Result As FMODEx.FMOD_RESULT ' exinfo.cbsize = FMODEx.FMOD_CREATESOUNDEXINFO_SIZE ' Result = FMODEx.FMOD_System_CreateStreamEx(FmodSystem, Name_or_data, Mode, exinfo, Sound) ' FMOD_System_CreateStream = Result 'End Function
[code:2gmw4v2y]Public Class FMODEx
Public Enum FMOD_RESULT
FMOD_OK ‘ No errors.
FMOD_ERR_ALREADYLOCKED ‘ Tried to call lock a second time before unlock was called.
FMOD_ERR_BADCOMMAND ‘ Tried to call a function on a data type that does not allow this type of functionality (ie calling Sound::lock on a streaming sound).
FMOD_ERR_CDDA_DRIVERS ‘ Neither NTSCSI nor ASPI could be initialised.
FMOD_ERR_CDDA_INIT ‘ An error occurred while initialising the CDDA subsystem.
FMOD_ERR_CDDA_INVALID_DEVICE ‘ Couldn’t find the specified device.
FMOD_ERR_CDDA_NOAUDIO ‘ No audio tracks on the specified disc.
FMOD_ERR_CDDA_NODEVICES ‘ No CD/DVD devices were found.
FMOD_ERR_CDDA_NODISC ‘ No disc present in the specified drive.
FMOD_ERR_CDDA_READ ‘ A CDDA read error occurred.
FMOD_ERR_CHANNEL_ALLOC ‘ Error trying to allocate a channel.
FMOD_ERR_CHANNEL_STOLEN ‘ The specified channel has been reused to play another sound.
FMOD_ERR_COM ‘ A Win32 COM related error occured. COM failed to initialize or a QueryInterface failed meaning a Windows codec or driver was not installed properly.
FMOD_ERR_DMA ‘ DMA Failure. See debug output for more information.
FMOD_ERR_DSP_CONNECTION ‘ DSP connection error. Connection possibly caused a cyclic dependancy.
FMOD_ERR_DSP_FORMAT ‘ DSP Format error. A DSP unit may have attempted to connect to this network with the wrong format.
FMOD_ERR_DSP_NOTFOUND ‘ DSP connection error. Couldn’t find the DSP unit specified.
FMOD_ERR_DSP_RUNNING ‘ DSP error. Cannot perform this operation while the network is in the middle of running. This will most likely happen if a connection or disconnection is attempted in a DSP callback.
FMOD_ERR_DSP_TOOMANYCONNECTIONS ‘ DSP connection error. The unit being connected to or disconnected should only have 1 input or output.
FMOD_ERR_FILE_BAD ‘ Error loading file.
FMOD_ERR_FILE_COULDNOTSEEK ‘ Couldn’t perform seek operation. This is a limitation of the medium (ie netstreams) or the file format.
FMOD_ERR_FILE_EOF ‘ End of file unexpectedly reached while trying to read essential data (truncated data?).
FMOD_ERR_FILE_NOTFOUND ‘ File not found.
FMOD_ERR_FILE_UNWANTED ‘ Unwanted file access occured.
FMOD_ERR_FORMAT ‘ Unsupported file or audio format.
FMOD_ERR_HTTP ‘ A HTTP error occurred. This is a catch-all for HTTP errors not listed elsewhere.
FMOD_ERR_HTTP_ACCESS ‘ The specified resource requires authentication or is forbidden.
FMOD_ERR_HTTP_PROXY_AUTH ‘ Proxy authentication is required to access the specified resource.
FMOD_ERR_HTTP_SERVER_ERROR ‘ A HTTP server error occurred.
FMOD_ERR_HTTP_TIMEOUT ‘ The HTTP request timed out.
FMOD_ERR_INITIALIZATION ‘ FMOD was not initialized correctly to support this function.
FMOD_ERR_INITIALIZED ‘ Cannot call this command after System::init.
FMOD_ERR_INTERNAL ‘ An error occured that wasnt supposed to. Contact support.
FMOD_ERR_INVALID_ADDRESS ‘ On Xbox 360, this memory address passed to FMOD must be physical, (ie allocated with XPhysicalAlloc.)
FMOD_ERR_INVALID_FLOAT ‘ Value passed in was a NaN, Inf or denormalized float.
FMOD_ERR_INVALID_HANDLE ‘ An invalid object handle was used.
FMOD_ERR_INVALID_PARAM ‘ An invalid parameter was passed to this function.
FMOD_ERR_INVALID_SPEAKER ‘ An invalid speaker was passed to this function based on the current speaker mode.
FMOD_ERR_INVALID_VECTOR ‘ The vectors passed in are not unit length, or perpendicular.
FMOD_ERR_IRX ‘ PS2 only. fmodex.irx failed to initialize. This is most likely because you forgot to load it.
FMOD_ERR_MEMORY ‘ Not enough memory or resources.
FMOD_ERR_MEMORY_IOP ‘ PS2 only. Not enough memory or resources on PlayStation 2 IOP ram.
FMOD_ERR_MEMORY_SRAM ‘ Not enough memory or resources on console sound ram.
FMOD_ERR_MEMORY_CANTPOINT ‘ Can’t use FMOD_OPENMEMORY_POINT on non PCM source data, or non mp3/xma/adpcm data if FMOD_CREATECOMPRESSEDSAMPLE was used.
FMOD_ERR_NEEDS2D ‘ Tried to call a command on a 3d sound when the command was meant for 2d sound.
FMOD_ERR_NEEDS3D ‘ Tried to call a command on a 2d sound when the command was meant for 3d sound.
FMOD_ERR_NEEDSHARDWARE ‘ Tried to use a feature that requires hardware support. (ie trying to play a VAG compressed sound in software on PS2).
FMOD_ERR_NEEDSSOFTWARE ‘ Tried to use a feature that requires the software engine. Software engine has either been turned off or command was executed on a hardware channel which does not support this feature.
FMOD_ERR_NET_CONNECT ‘ Couldn’t connect to the specified host.
FMOD_ERR_NET_SOCKET_ERROR ‘ A socket error occurred. This is a catch-all for socket-related errors not listed elsewhere.
FMOD_ERR_NET_URL ‘ The specified URL couldn’t be resolved.
FMOD_ERR_NOTREADY ‘ Operation could not be performed because specified sound is not ready.
FMOD_ERR_OUTPUT_ALLOCATED ‘ Error initializing output device, but more specifically, the output device is already in use and cannot be reused.
FMOD_ERR_OUTPUT_CREATEBUFFER ‘ Error creating hardware sound buffer.
FMOD_ERR_OUTPUT_DRIVERCALL ‘ A call to a standard soundcard driver failed, which could possibly mean a bug in the driver or resources were missing or exhausted.
FMOD_ERR_OUTPUT_FORMAT ‘ Soundcard does not support the minimum features needed for this soundsystem (16bit stereo output).
FMOD_ERR_OUTPUT_INIT ‘ Error initializing output device.
FMOD_ERR_OUTPUT_NOHARDWARE ‘ FMOD_HARDWARE was specified but the sound card does not have the resources nescessary to play it.
FMOD_ERR_OUTPUT_NOSOFTWARE ‘ Attempted to create a software sound but no software channels were specified in System::init.
FMOD_ERR_PAN ‘ Panning only works with mono or stereo sound sources.
FMOD_ERR_PLUGIN ‘ An unspecified error has been returned from a 3rd party plugin.
FMOD_ERR_PLUGIN_MISSING ‘ A requested output, dsp unit type or codec was not available.
FMOD_ERR_PLUGIN_RESOURCE ‘ A resource that the plugin requires cannot be found. (ie the DLS file for MIDI playback)
FMOD_ERR_RECORD ‘ An error occured trying to initialize the recording device.
FMOD_ERR_REVERB_INSTANCE ‘ Specified Instance in FMOD_REVERB_PROPERTIES couldn’t be set. Most likely because another application has locked the EAX4 FX slot.
FMOD_ERR_SUBSOUNDS ‘ The error occured because the sound referenced contains subsounds. (ie you cannot play the parent sound as a static sample, only its subsounds.)
FMOD_ERR_SUBSOUND_ALLOCATED ‘ This subsound is already being used by another sound, you cannot have more than one parent to a sound. Null out the other parent’s entry first.
FMOD_ERR_TAGNOTFOUND ‘ The specified tag could not be found or there are no tags.
FMOD_ERR_TOOMANYCHANNELS ‘ The sound created exceeds the allowable input channel count. This can be increased using the maxinputchannels parameter in System::setSoftwareFormat.
FMOD_ERR_UNIMPLEMENTED ‘ Something in FMOD hasn’t been implemented when it should be! contact support!
FMOD_ERR_UNINITIALIZED ‘ This command failed because System::init or System::setDriver was not called.
FMOD_ERR_UNSUPPORTED ‘ A command issued was not supported by this object. Possibly a plugin without certain callbacks specified.
FMOD_ERR_UPDATE ‘ On PS2, System::update was called twice in a row when System::updateFinished must be called first.
FMOD_ERR_VERSION ‘ The version number of this file format is not supported.
FMOD_ERR_EVENT_FAILED ' An Event failed to be retrieved, most likely due to "just fail" being specified as the max playbacks behaviour. FMOD_ERR_EVENT_INTERNAL ' An error occured that wasn't supposed to. See debug log for reason. FMOD_ERR_EVENT_NAMECONFLICT ' A category with the same name already exists. FMOD_ERR_EVENT_NOTFOUND ' The requested event, event group, event category or event property could not be found. End Enum Public Enum FMOD_INITFLAGS FMOD_INIT_NORMAL = &H0 ' All platforms - Initialize normally. FMOD_INIT_STREAM_FROM_UPDATE = &H1 ' All platforms - No stream thread is created internally. Streams are driven from System::update. Mainly used with non-realtime outputs. ' FMOD_INIT_3D_RIGHTHANDED = &H2 ' All platforms - FMOD will treat +X as left, +Y as up and +Z as forwards. FMOD_INIT_DISABLESOFTWARE = &H4 ' All platforms - Disable software mixer to save memory. Anything created with FMOD_SOFTWARE will fail and DSP will not work. FMOD_INIT_DSOUND_HRTFNONE = &H200 ' Win32 only - for DirectSound output - FMOD_HARDWARE | FMOD_3D buffers use simple stereo panning/doppler/attenuation when 3D hardware acceleration is not present. FMOD_INIT_DSOUND_HRTFLIGHT = &H400 ' Win32 only - for DirectSound output - FMOD_HARDWARE | FMOD_3D buffers use a slightly higher quality algorithm when 3D hardware acceleration is not present. FMOD_INIT_DSOUND_HRTFFULL = &H800 ' Win32 only - for DirectSound output - FMOD_HARDWARE | FMOD_3D buffers use full quality 3D playback when 3d hardware acceleration is not present. FMOD_INIT_PS2_DISABLECORE0REVERB = &H10000 ' PS2 only - Disable reverb on CORE 0 to regain SRAM. FMOD_INIT_PS2_DISABLECORE1REVERB = &H20000 ' PS2 only - Disable reverb on CORE 1 to regain SRAM. FMOD_INIT_XBOX_REMOVEHEADROOM = &H100000 ' XBox only - By default DirectSound attenuates all sound by 6db to avoid clipping/distortion. CAUTION. If you use this flag you are responsible for the final mix to make sure clipping / distortion doesn't happen. End Enum Public Enum FMOD_MODE FMOD_DEFAULT = &H0 ' FMOD_DEFAULT is a default sound type. Equivalent to all the defaults listed below. FMOD_LOOP_OFF, FMOD_2D, FMOD_HARDWARE. FMOD_LOOP_OFF = &H1 ' For non looping sounds. (default). Overrides FMOD_LOOP_NORMAL / FMOD_LOOP_BIDI. FMOD_LOOP_NORMAL = &H2 ' For forward looping sounds. FMOD_LOOP_BIDI = &H4 ' For bidirectional looping sounds. (only works on software mixed static sounds). FMOD_2D = &H8 ' Ignores any 3d processing. (default). FMOD_3D = &H10 ' Makes the sound positionable in 3D. Overrides FMOD_2D. FMOD_HARDWARE = &H20 ' Attempts to make sounds use hardware acceleration. (default). FMOD_SOFTWARE = &H40 ' Makes sound reside in software. Overrides FMOD_HARDWARE. Use this for FFT, DSP, 2D multi speaker support and other software related features. FMOD_CREATESTREAM = &H80 ' Decompress at runtime, streaming from the source provided (standard stream). Overrides FMOD_CREATESAMPLE. FMOD_CREATESAMPLE = &H100 ' Decompress at loadtime, decompressing or decoding whole file into memory as the target sample format. (standard sample). FMOD_CREATECOMPRESSEDSAMPLE = &H200 ' Load MP2, MP3, IMAADPCM or XMA into memory and leave it compressed. During playback the FMOD software mixer will decode it in realtime as a 'compressed sample'. Can only be used in combination with FMOD_SOFTWARE. FMOD_OPENUSER = &H400 ' Opens a user created static sample or stream. Use FMOD_CREATESOUNDEXINFO to specify format and/or read callbacks. If a user created 'sample' is created with no read callback, the sample will be empty. Use FMOD_Sound_Lock and FMOD_Sound_Unlock to place sound data into the sound if this is the case. FMOD_OPENMEMORY = &H800 ' "name_or_data" will be interpreted as a pointer to memory instead of filename for creating sounds. FMOD_OPENRAW = &H1000 ' Will ignore file format and treat as raw pcm. User may need to declare if data is FMOD_SIGNED or FMOD_UNSIGNED ' FMOD_OPENONLY = &H2000 ' Just open the file, dont prebuffer or read. Good for fast opens for info, or when FMOD_Sound_ReadData is to be used. FMOD_ACCURATETIME = &H4000 ' For FMOD_System_CreateSound - for accurate FMOD_Sound_GetLength / FMOD_Channel_SetPosition on VBR MP3, AAC and MOD/S3M/XM/IT/MIDI files. Scans file first, so takes longer to open. FMOD_OPENONLY does not affect this. FMOD_MPEGSEARCH = &H8000 ' For corrupted / bad MP3 files. This will search all the way through the file until it hits a valid MPEG header. Normally only searches for 4k. FMOD_NONBLOCKING = &H10000 ' For opening sounds asyncronously, return value from open function must be polled for when it is ready. FMOD_UNIQUE = &H20000 ' Unique sound, can only be played one at a time ' FMOD_3D_HEADRELATIVE = &H40000 ' Make the sound's position, velocity and orientation relative to the listener. FMOD_3D_WORLDRELATIVE = &H80000 ' Make the sound's position, velocity and orientation absolute (relative to the world). (DEFAULT) FMOD_3D_LOGROLLOFF = &H100000 ' This sound will follow the standard logarithmic rolloff model where mindistance = full volume, maxdistance = where sound stops attenuating, and rolloff is fixed according to the global rolloff factor. (default) FMOD_3D_LINEARROLLOFF = &H200000 ' This sound will follow a linear rolloff model where mindistance = full volume, maxdistance = silence. FMOD_3D_CUSTOMROLLOFF = &H4000000 ' This sound will follow a rolloff model defined by FMOD_Sound_Set3DCustomRolloff / FMOD_Channel_Set3DCustomRolloff. FMOD_CDDA_FORCEASPI = &H400000 ' For CDDA sounds only - use ASPI instead of NTSCSI to access the specified CD/DVD device. FMOD_CDDA_JITTERCORRECT = &H800000 ' For CDDA sounds only - perform jitter correction. Jitter correction helps produce a more accurate CDDA stream at the cost of more CPU time. FMOD_UNICODE = &H1000000 ' Filename is double-byte unicode. FMOD_IGNORETAGS = &H2000000 ' Skips id3v2/asf/etc tag checks when opening a sound, to reduce seek/read overhead when opening files (helps with CD performance). FMOD_LOWMEM = &H8000000 ' Removes some features from samples to give a lower memory overhead, like FMOD_Sound_GetName. End Enum Public Enum FMOD_CHANNELINDEX FMOD_CHANNEL_FREE = -1 ' For a channel index, FMOD chooses a free voice using the priority system. FMOD_CHANNEL_REUSE = -2 ' For a channel index, re-use the channel handle that was passed in. End Enum Public Enum FMOD_SOUND_TYPE FMOD_SOUND_TYPE_UNKNOWN ' 3rd party / unknown plugin format. FMOD_SOUND_TYPE_AAC ' AAC. Currently unsupported. FMOD_SOUND_TYPE_AIFF ' AIFF. FMOD_SOUND_TYPE_ASF ' Microsoft Advanced Systems Format (ie WMA/ASF/WMV). FMOD_SOUND_TYPE_AT3 ' Sony ATRAC 3 format FMOD_SOUND_TYPE_CDDA ' Digital CD audio. FMOD_SOUND_TYPE_DLS ' Sound font / downloadable sound bank. FMOD_SOUND_TYPE_FLAC ' FLAC lossless codec. FMOD_SOUND_TYPE_FSB ' FMOD Sample Bank. FMOD_SOUND_TYPE_GCADPCM ' GameCube ADPCM FMOD_SOUND_TYPE_IT ' Impulse Tracker. FMOD_SOUND_TYPE_MIDI ' MIDI. FMOD_SOUND_TYPE_MOD ' Protracker / Fasttracker MOD. FMOD_SOUND_TYPE_MPEG ' MP2/MP3 MPEG. FMOD_SOUND_TYPE_OGGVORBIS ' Ogg vorbis. FMOD_SOUND_TYPE_PLAYLIST ' Information only from ASX/PLS/M3U/WAX playlists FMOD_SOUND_TYPE_RAW ' Raw PCM data. FMOD_SOUND_TYPE_S3M ' ScreamTracker 3. FMOD_SOUND_TYPE_SF2 ' Sound font 2 format. FMOD_SOUND_TYPE_USER ' User created sound. FMOD_SOUND_TYPE_WAV ' Microsoft WAV. FMOD_SOUND_TYPE_XM ' FastTracker 2 XM. FMOD_SOUND_TYPE_XMA ' Xbox360 XMA FMOD_SOUND_TYPE_VAG ' PlayStation 2 / PlayStation Portable adpcm VAG format. End Enum Public Enum FMOD_SOUND_FORMAT FMOD_SOUND_FORMAT_NONE ' Unitialized / unknown. FMOD_SOUND_FORMAT_PCM8 ' 8bit integer PCM data. FMOD_SOUND_FORMAT_PCM16 ' 16bit integer PCM data. FMOD_SOUND_FORMAT_PCM24 ' 24bit integer PCM data. FMOD_SOUND_FORMAT_PCM32 ' 32bit integer PCM data. FMOD_SOUND_FORMAT_PCMFLOAT ' 32bit floating point PCM data. FMOD_SOUND_FORMAT_GCADPCM ' Compressed GameCube DSP data. FMOD_SOUND_FORMAT_IMAADPCM ' Compressed XBox ADPCM data. FMOD_SOUND_FORMAT_VAG ' Compressed PlayStation 2 ADPCM data. FMOD_SOUND_FORMAT_XMA ' Compressed Xbox360 data. FMOD_SOUND_FORMAT_MPEG ' Compressed MPEG layer 2 or 3 data. FMOD_SOUND_FORMAT_MAX ' Maximum number of sound formats supported. End Enum Public Structure FMOD_CREATESOUNDEXINFO Dim cbsize As Integer ' [in] Size of this structure. This is used so the structure can be expanded in the future and still work on older versions of FMOD Ex. Dim Length As Integer ' [in] Optional. Specify 0 to ignore. Size in bytes of file to load, or sound to create (in this case only if FMOD_OPENUSER is used). Required if loading from memory. If 0 is specified, then it will use the size of the file (unless loading from memory then an error will be returned). Dim fileoffset As Integer ' [in] Optional. Specify 0 to ignore. Offset from start of the file to start loading from. This is useful for loading files from inside big data files. Dim Numchannels As Integer ' [in] Optional. Specify 0 to ignore. Number of channels in a sound specified only if FMOD_OPENUSER is used. Dim defaultfrequency As Integer ' [in] Optional. Specify 0 to ignore. Default frequency of sound in a sound specified only if FMOD_OPENUSER is used. Other formats use the frequency determined by the file format. Dim Format As FMOD_SOUND_FORMAT ' [in] Optional. Specify 0 or FMOD_SOUND_FORMAT_NONE to ignore. Format of the sound specified only if FMOD_OPENUSER is used. Other formats use the format determined by the file format. Dim decodebuffersize As Integer ' [in] Optional. Specify 0 to ignore. For streams. This determines the size of the double buffer (in PCM samples) that a stream uses. Use this for user created streams if you want to determine the size of the callback buffer passed to you. Specify 0 to use FMOD's default size which is currently equivalent to 400ms of the sound format created/loaded. Dim initialsubsound As Integer ' [in] Optional. Specify 0 to ignore. In a multi-sample file format such as .FSB/.DLS/.SF2, specify the initial subsound to seek to, only if FMOD_CREATESTREAM is used. Dim Numsubsounds As Integer ' [in] Optional. Specify 0 to ignore or have no subsounds. In a user created multi-sample sound, specify the number of subsounds within the sound that are accessable with Sound::getSubSound. Dim inclusionlist As Integer ' [in] Optional. Specify 0 to ignore. In a multi-sample format such as .FSB/.DLS/.SF2 it may be desirable to specify only a subset of sounds to be loaded out of the whole file. This is an array of subsound indicies to load into memory when created. Dim inclusionlistnum As Integer ' [in] Optional. Specify 0 to ignore. This is the number of integers contained within the inclusionlist array. Dim pcmreadcallback As Integer ' [in] Optional. Specify 0 to ignore. Callback to 'piggyback' on FMOD's read functions and accept or even write PCM data while FMOD is opening the sound. Used for user sounds created with FMOD_OPENUSER or for capturing decoded data as FMOD reads it. Dim pcmsetposcallback As Integer ' [in] Optional. Specify 0 to ignore. Callback for when the user calls a seeking function such as Channel::setTime or Channel::setPosition within a multi-sample sound, and for when it is opened. Dim nonblockcallback As Integer ' [in] Optional. Specify 0 to ignore. Callback for successful completion, or error while loading a sound that used the FMOD_NONBLOCKING flag. Dim dlsname As String ' [in] Optional. Specify 0 to ignore. Filename for a DLS or SF2 sample set when loading a MIDI file. If not specified, on windows it will attempt to open /windows/system32/drivers/gm.dls, otherwise the MIDI will fail to open. Dim encryptionkey As String ' [in] Optional. Specify 0 to ignore. Key for encrypted FSB file. Without this key an encrypted FSB file will not load. Dim maxpolyphony As Integer ' [in] Optional. Specify 0 to ingore. For sequenced formats with dynamic channel allocation such as .MID and .IT, this specifies the maximum voice count allowed while playing. .IT defaults to 64. .MID defaults to 32. Dim userdata As Integer ' [in] Optional. Specify 0 to ignore. This is user data to be attached to the sound during creation. Access via Sound::getUserData. Dim suggestedsoundtype As FMOD_SOUND_TYPE ' [in] Optional. Specify 0 or FMOD_SOUND_TYPE_UNKNOWN to ignore. Instead of scanning all codec types, use this to speed up loading by making it jump straight to this codec. Dim useropen As Integer ' [in] Optional. Specify 0 to ignore. Callback for opening this file. Dim userclose As Integer ' [in] Optional. Specify 0 to ignore. Callback for closing this file. Dim userread As Integer ' [in] Optional. Specify 0 to ignore. Callback for reading from this file. Dim userseek As Integer End Structure Public Const FMOD_VERSION As Integer = &H40614 Public Const FMOD_CREATESOUNDEXINFO_SIZE As Long = 92 'sizeof(FMOD_CREATESOUNDEXINFO) Public Declare Function FMOD_System_Create Lib "fmodex" Alias "FMOD_System_Create" (ByRef FmodSystem As Integer) As FMOD_RESULT Public Declare Function FMOD_System_GetVersion Lib "fmodex" Alias "FMOD_System_GetVersion" (ByVal FmodSystem As Integer, ByRef Version As Integer) As FMOD_RESULT Public Declare Function FMOD_System_Init Lib "fmodex" Alias "FMOD_System_Init" (ByVal FmodSystem As Integer, ByVal Maxchannels As Integer, ByVal Flags As FMOD_INITFLAGS, ByVal Extradriverdata As Integer) As FMOD_RESULT Public Declare Function FMOD_System_CreateStreamEx Lib "fmodex" Alias "FMOD_System_CreateStream" (ByVal FmodSystem As Integer, ByVal Name_or_data As String, ByVal Mode As FMOD_MODE, ByVal exinfo As Integer, ByRef Sound As Integer) As FMOD_RESULT Public Declare Function FMOD_System_CreateSoundEx Lib "fmodex" Alias "FMOD_System_CreateSound" (ByVal FmodSystem As Integer, ByVal Name_or_data As String, ByVal Mode As FMOD_MODE, ByVal exinfo As Integer, ByRef Sound As Integer) As FMOD_RESULT Public Declare Function FMOD_System_PlaySound Lib "fmodex" Alias "FMOD_System_PlaySound" (ByVal FmodSystem As Integer, ByVal Channelid As FMOD_CHANNELINDEX, ByVal Sound As Integer, ByVal Paused As Integer, ByRef Channel As Integer) As FMOD_RESULT
- lindomar asked 12 years ago
- You must login to post comments