📄 mikmod.texi
字号:
For an example of how to build an @code{MWRITER} object, please refer to the@code{MFILEWRITER} object in file @code{mmio/mmio.c} in the library sources.@c ========================================================== Error reference@node Error Reference, Function Reference, Structure Reference, Library Reference@section Error ReferenceThe following errors are currently defined:@subsection General Errors@table @samp@item MMERR_DYNAMIC_LINKINGThis error occurs when a specific driver was requested, but the support sharedlibrary couldn't be loaded. Currently, the only drivers which can yield thiserror are the ALSA, EsounD and Ultra drivers.@item MMERR_OPENING_FILEThis error occurs when a file can not be opened, either for read access from a@code{xx_Loadxx} function, or for write access from the disk writer drivers.@item MMERR_OUT_OF_MEMORYThis error occurs when there is not enough virtual memory available to completethe operation, or there is enough memory but the calling process would exceedits memory limit. MikMod does not do any resource tuning, your program has touse the @code{setrlimit} function to do this if it needs to load very hugesamples.@end table@subsection Sample Errors@table @samp@item MMERR_SAMPLE_TOO_BIGThis error occurs when the memory allocation of the sample data yields theerror @code{MMERR_OUT_OF_MEMORY}.@item MMERR_OUT_OF_HANDLESThis error occurs when your program reaches the limit of loaded samples,currently defined as 384, which should be sufficient for most cases.@item MMERR_UNKNOWN_WAVE_TYPEThis error occurs when you're trying to load a sample which format is notrecognized.@end table@subsection Module Errors@table @samp@item MMERR_ITPACK_INVALID_DATAThis error occurs when a compressed module sample is corrupt.@item MMERR_LOADING_HEADERThis error occurs when you're trying to load a module which has a corruptedheader, or is truncated.@item MMERR_LOADING_PATTERNThis error occurs when you're trying to load a module which has corruptedpattern data, or is truncated.@item MMERR_LOADING_SAMPLEINFOThis error occurs when you're trying to load a module which has corruptedsample information, or is truncated.@item MMERR_LOADING_TRACKThis error occurs when you're trying to load a module which has corruptedtrack data, or is truncated.@item MMERR_MED_SYNTHSAMPLESThis error occurs when you're trying to load a MED module which has synthsoundssamples, which are currently not supported.@footnote{You can force libmikmod toload the module (without the synthsounds, of course) by setting the@code{curious} parameter to @code{1} when invoking @code{Player_Loadxx}.}@item MMERR_NOT_A_MODULEThis error occurs when you're trying to load a module which format is notrecognized.@item MMERR_NOT_A_STREAMThis error occurs when you're trying to load a sample with a sample which formatis not recognized.@end table@subsection Driver Errors@ifnottex@subsubsection Generic Driver Errors@end ifnottex@iftexGeneric driver errors@end iftex@table @samp@item MMERR_16BIT_ONLYThis error occurs when the sound device doesn't support non-16 bit linearsound output, which are the requested settings.@item MMERR_8BIT_ONLYThis error occurs when the sound device doesn't support non-8 bit linearsound output, which are the requested settings.@item MMERR_DETECTING_DEVICEThis error occurs when the driver's sound device has not been detected.@item MMERR_INITIALIZING_MIXERThis error occurs when MikMod's internal software mixer could not be initializedproperly.@item MMERR_INVALID_DEVICEThis error occurs when the driver number (in @code{md_device}) is out of range.@item MMERR_NON_BLOCKThis error occurs when the driver is unable to set the audio device in nonblocking mode.@item MMERR_OPENING_AUDIOThis error occurs when the driver can not open sound device.@item MMERR_STEREO_ONLYThis error occurs when the sound device doesn't support mono sound output, whichis the requested setting.@item MMERR_ULAWThis error occurs when the sound device only supports uLaw output (whichimplies mono, 8 bit, and 8000 Hz sampling rate), which isn't the requestedsetting.@end table@ifnottex@subsubsection AudioFile Driver Specific Error@end ifnottex@iftexAudioFile driver specific error@end iftex@table @samp@item MMERR_AF_AUDIO_PORTThis error occurs when the AudioFile driver can not find a suitable AudioFileport.@end table@ifnottex@subsubsection AIX Driver Specific Errors@end ifnottex@iftexAIX driver specific errors@end iftex@table @samp@item MMERR_AIX_CONFIG_CONTROLThis error occurs when the ``Control'' step of the device configuration hasfailed.@item MMERR_AIX_CONFIG_INITThis error occurs when the ``Init'' step of the device configuration has failed.@item MMERR_AIX_CONFIG_STARTThis error occurs when the ``Start'' step of the device configuration has failed.@end table@ifnottex@subsubsection Ultra Driver Specific Errors@end ifnottex@iftexUltra driver specific errors@end iftex@table @samp@item MMERR_GUS_RESETThis error occurs when the sound device couldn't be reset.@item MMERR_GUS_SETTINGSThis error occurs because the sound device only works in 16 bit linear stereosound at 44100 Hz, which is not the requested settings.@item MMERR_GUS_TIMERThis error occurs when the ultra driver could not setup the playback timer.@end table@ifnottex@subsubsection HP-UX Driver Specific Errors@end ifnottex@iftexHP-UX driver specific errors@end iftex@table @samp@item MMERR_HP_AUDIO_DESCThis error occurs when the HP driver can not get the audio hardware description.@item MMERR_HP_AUDIO_OUTPUTThis error occurs when the HP driver can not select the audio output.@item MMERR_HP_BUFFERSIZEThis error occurs when the HP driver can not set the transmission buffer size.@item MMERR_HP_CHANNELSThis error occurs when the HP driver can not set the requested number ofchannels.@item MMERR_HP_SETSAMPLESIZEThis error occurs when the HP driver can not set the requested sample size.@item MMERR_HP_SETSPEEDThis error occurs when the HP driver can not set the requested sample rate.@end table@ifnottex@subsubsection Open Sound System Driver Specific Errors@end ifnottex@iftexOpen Sound System driver specific errors@end iftex@table @samp@item MMERR_OSS_SETFRAGMENTThis error occurs when the OSS driver can not set audio fragment size.@item MMERR_OSS_SETSAMPLESIZEThis error occurs when the OSS driver can not set the requested sample size.@item MMERR_OSS_SETSPEEDThis error occurs when the OSS driver can not set the requested sample rate.@item MMERR_OSS_SETSTEREOThis error occurs when the OSS driver can not set the requested number ofchannels.@end table@ifnottex@subsubsection SGI Driver Specific Errors@end ifnottex@iftexSGI driver specific errors@end iftex@table @samp@item MMERR_SGI_MONOThis error occurs when the hardware only supports stereo sound.@item MMERR_SGI_SPEEDThis error occurs when the hardware does not support the requested sample rate.@item MMERR_SGI_STEREOThis error occurs when the hardware only supports mono sound.@item MMERR_SGI_16BITThis error occurs when the hardware only supports 16 bit sound.@item MMERR_SGI_8BITThis error occurs when the hardware only supports 8 bit sound.@end table@ifnottex@subsubsection Sun Driver Specific Error@end ifnottex@iftexSun driver specific error@end iftex@table @samp@item MMERR_SUN_INITThis error occurs when the sound device initialization failed.@end table@ifnottex@subsubsection OS/2 Driver Specific Errors@end ifnottex@iftexOS/2 driver specific errors@end iftex@table @samp@item MMERR_OS2_MIXSETUPThis error occurs when the DART driver can not set the mixing parameters.@item MMERR_OS2_SEMAPHOREThis error occurs when the MMPM/2 driver can not create the semaphores neededfor playback.@item MMERR_OS2_THREADThis error occurs when the MMPM/2 driver can not create the thread needed forplayback.@item MMERR_OS2_TIMERThis error occurs when the MMPM/2 driver can not create the timer needed forplayback.@end table@ifnottex@subsubsection DirectX Driver Specific Errors@end ifnottex@iftexDirectX Driver Specific Errors@end iftex@table @samp@item MMERR_DS_BUFFERThis error occurs when the DirectX driver can not allocate the playback buffers.@item MMERR_DS_EVENTThis error occurs when the DirectX driver can not register the playback event.@item MMERR_DS_FORMATThis error occurs when the DirectX driver can not set the playback format.@item MMERR_DS_NOTIFYThis error occurs when the DirectX driver can not register the playbackcallback.@item MMERR_DS_PRIORITYThis error occurs when the DirectX driver can not set the playback priority.@item MMERR_DS_THREADThis error occurs when the DirectX driver can not create the playback thread.@item MMERR_DS_UPDATEThis error occurs when the DirectX driver can not initialize the playbackthread.@end table@ifnottex@subsubsection Windows Multimedia API Driver Specific Errors@end ifnottex@iftexWindows Multimedia API Driver Specific Errors@end iftex@table @samp@item MMERR_WINMM_ALLOCATEDThis error occurs when the playback resource is already allocated by anotherapplication.@item MMERR_WINMM_DEVICEIDThis error occurs when the Multimedia API Driver is given an invalid audiodevice identificator.@item MMERR_WINMM_FORMATThis error occurs when the playback output format is not supported by the audiodevice.@item MMERR_WINMM_HANDLEThis error occurs when the Multimedia API Driver is given an invalid handle.@item MMERR_WINMM_UNKNOWNThis error should not occur ! If you get this error, please contact thelibmikmod development mailing list.@end table@ifnottex@subsubsection MacOS Driver Specific Errors@end ifnottex@iftexMacOS Driver Specific Errors@end iftex@table @samp@item MMERR_MAC_SPEEDThis error occurs when the playback speed is not supported by the audio device.@item MMERR_MAC_STARTThis error occurs when the MacOS driver can not start playback.@end table@c ========================================================== Function reference@node Function Reference, Library Core Functions, Error Reference, Library Reference@section Function Reference@menu* Library Core Functions:: MikMod_xx functions.* Module Player Functions:: Player_xx functions.* Sample Functions:: Sample_xx functions.* Voice Functions:: Voice_xx functions.@end menu@c ========================================================== MikMod_xx@node Library Core Functions, Module Player Functions, Function Reference, Function Reference@subsection Library Core Functions@ifnottex@subsubsection MikMod_Active@end ifnottex@findex MikMod_Active@code{BOOL MikMod_Active(void)}@table @i@item DescriptionThis function returns whether sound output is enabled or not.@item Result@itemx 0Sound output is disabled.@item 1Sound output is enabled.@item NotesCalls to @code{MikMod_Update} will be ignored when sound output is disabled.@item See also@code{MikMod_DisableOutput}, @code{MikMod_EnableOutput}.@end table@ifnottex@subsubsection MikMod_DisableOutput@end ifnottex@findex MikMod_DisableOutput@code{void MikMod_DisableOutput(void)}@table @i@item DescriptionThis function stops the sound mixing.@item NotesCalls to @code{MikMod_Update} will be ignored when sound output is disabled.@item See also@code{MikMod_Active}, @code{MikMod_EnableOutput}.@end table@ifnottex@subsubsection MikMod_EnableOutput@end ifnottex@findex MikMod_EnableOutput@code{BOOL MikMod_EnableOutput(void)}@table @i@item DescriptionThis function starts the sound mixing.@item
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -