⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mikmod.texi

📁 tcpmp.src.0.72RC1 优秀的多媒体播放器TCPMP的源代码
💻 TEXI
📖 第 1 页 / 共 5 页
字号:
Sound playback frequency, in hertz. High valuesyield high sound quality, but need more computing power than lower values. Thedefault value is 44100 Hz, which is compact disc quality. Other common valuesare 22100 Hz (radio quality), 11025 Hz (phone quality), and 8000 Hz (mu-lawquality).@vindex md_mode@item UWORD md_modeThis variable is a combination of several flags, to select which output modeto select.The following flags have a direct action to the sound output (i.e. changes takeeffect immediately):@table @samp@item DMODE_INTERPThis flag, if set, enables the interpolated mixers. Interpolated mixing givesbetter sound but takes a bit more time than standard mixing. If the libraryis built with the high quality mixer, interpolated mixing is always enabled,regardless of this flag.@item DMODE_REVERSEThis flag, if set, exchanges the left and right stereo channels.@item DMODE_SURROUNDThis flag, if set, enables the surround mixers. Since surround mixing worksonly for stereo sound, this flag has no effect if the sound playback is inmono.@end table@*The following flags aren't taken in account until the sound driver is changedor reset:@table @samp@item DMODE_16BITThis flag, if set, selects 16 bit sound mode. This mode yields better soundquality, but needs twice more mixing time.@item DMODE_HQMIXERThis flag, if set, selects the high-quality software mixer. This mode yieldsbetter sound quality, but needs more mixing time. Of course, this flag has noeffect if no @code{DMODE_SOFT_xx} flag is set.@item DMODE_SOFT_MUSICThis flag, if set, selects software mixing of the module.@item DMODE_SOFT_SNDFXThis flag, if set, selects software mixing of the sound effects.@item DMODE_STEREOThis flag, if set, selects stereo sound.@end table@*The default value of this variable is @samp{DMODE_STEREO | DMODE_SURROUND |DMODE_16BITS | DMODE_SOFT_MUSIC | DMODE_SOFT_SNDFX}.@end table@c ========================================================== Structure reference@node Structure Reference, Error Reference, Variable Reference, Library Reference@section Structure ReferenceOnly the useful fields are described here; if a structure field is notdescribed, you must assume that it's an internal field which must not bemodified.@subsection Drivers@tindex MDRIVERThe @code{MDRIVER} structure is not meant to be used by anything else than thecore of the library, but its first four fields contain useful information foryour programs:@table @code@item CHAR* NameName of the driver, usually never more than 20 characters.@item CHAR* DescriptionDescription of the driver, usually never more than 50 characters.@item UBYTE HardVoiceLimitMaximum number of hardware voices for this driver, 0 if the driver has nohardware mixing support.@item UBYTE SoftVoiceLimitMaximum number of software voices for this driver, 0 if the driver has nosoftware mixing support.@item CHAR* AliasA short name for the driver, without spaces, usually never more than 10characters.@end table@subsection Modules@tindex MODULEThe @code{MODULE} structure gathers all the necessary information needed toplay a module file, regardless of its initial format.@subsubsection General Module InformationThe fields described in this section contain general information about themodule and should not be modified.@table @code@item CHAR* songnameName of the module.@item CHAR* modtypeType of the module (which tracker format).@item CHAR* commentEither the module comments, or NULL if the module doesn't have comments.@end table@table @code@item UWORD flagsSeveral module flags or'ed together.@table @samp@item UF_ARPMEMIf set, arpeggio effects have memory.@item UF_BGSLIDESIf set, volume slide effects continue until a new note or a new effect is played.@item UF_HIGHBPMIf set, the module is allowed to have its tempo value (bpm) over 255.@item UF_INSTIf set, the module has instruments and samples; otherwise, themodule has only samples.@item UF_LINEARIf set, slide periods are linear; otherwise, they are logarithmic.@item UF_NNAIf set, module uses new note actions (NNA) and the @code{numvoices} field isvalid.@item UF_NOWRAPIf set, pattern break on the last pattern does not continue to the firstpattern.@item UF_S3MSLIDESIf set, module uses old-S3M style volume slides (slides processed every tick);otherwise, it uses the standard style (slides processed every tick except thefirst).@item UF_XMPERIODSIf set, module uses XM-type periods; otherwise, it uses Amiga periods.@item UF_FT2QUIRKSIf set, module player will reproduce some FastTracker 2 quirks during playback.@item UF_PANNINGIf set, module use panning commands.@end table@item UBYTE numchnThe number of channels in the module.@item UBYTE numvoicesIf the module uses NNA, and this variable is not zero, it contains the limitof module voices; otherwise, the limit is set to the @code{maxchan} parameterof the @code{Player_Loadxx} functions.@item UWORD numposThe number of sound positions in the module.@item UWORD numpatThe number of patterns.@item UWORD numinsThe number of instruments.@item UWORD numsmpThe number of samples.@end table@table @code@item INSTRUMENT* instrumentsPoints to an array of instrument structures.@item SAMPLE* samplesPoints to an array of sample structures.@end table@table @code@item UBYTE realchnDuring playback, this variable contains the number of active channels (notcounting NNA channels).@item UBYTE totalchnDuring playback, this variable contains the total number of channels (includingNNA channels).@item ULONG sngtimeElapsed song time, in @math{2^@minus{}10} @dmn{seconds} units (not exactly amillisecond). To convert this value to seconds, divide by 1024, not 1000 !@end table@subsubsection Playback SettingsThe fields described here control the module playback and can be modified atany time, unless otherwise specified.@table @code@item UBYTE initspeedThe initial speed of the module (Protracker compatible). Valid range is 1-32.@item UBYTE inittempoThe initial tempo of the module (Protracker compatible). Valid range is32-255.@item UBYTE initvolumeThe initial overall volume of the module. Valid range is 0-128.@item UWORD panning[]The current channel panning positions. Only the first @code{numchn} values aredefined.@item UBYTE chanvol[]The current channel volumes. Only the first @code{numchn} values are defined.@item UWORD bpmThe current tempo of the module. Use @code{Player_SetTempo} to change its value.@item UBYTE sngspdThe current speed of the module. Use @code{Player_SetSpeed} to change its value.@item UBYTE volumeThe current overall volume of the module, in range 0-128. Use@code{Player_SetVolume} to change its value.@end table@table @code@item BOOL extspdIf zero, Protracker extended speed effect (in-module tempo modification) isnot processed. The default value is 1, which causes this effect to be processed.However, some old modules might not play correctly if this effect is notneutralized.@item BOOL panflagIf zero, panning effects are not processed. The default value is 1, which causeall panning effects to be processed. However, some old modules might not playcorrectly if panning is not neutralized.@item BOOL wrapIf nonzero, module wraps to its restart position when it is finished, toplay continuously. Default value is zero (play only once).@item UBYTE repposThe restart position of the module, when it wraps.@item BOOL loopIf nonzero, all in-module loops are processed; otherwise, backward loops whichdecrease the current position are not processed (i.e. only forward loops, andbackward loops in the same pattern, are processed). This ensures that the modulenever loops endlessly. The default value is 1 (all loops are processed).@item BOOL fadeoutIf nonzero, volume fades out during when last position of the module is beingplayed. Default value us zero (no fadeout).@end table@table @code@item UWORD patposCurrent position (row) in the pattern being played. Must not be changed.@item SWORD sngposCurrent song position. Do not change this variable directly, use@code{Player_NextPosition}, @code{Player_PrevPosition} or@code{Player_SetPosition} instead.@end table@table @code@item SWORD relspdRelative playback speed. The value of this variable is added to the moduletempo to define the actual playback speed. The default value is 0, which makemodules play at their intended speed.@end table@subsection Module Instruments@tindex INSTRUMENTAlthough the @code{INSTRUMENT} structure is intended for internal use, youmight need to know its name:@table @code@item CHAR* insnameThe instrument text, theoretically its name, but often a message line.@end table@subsection Samples@tindex SAMPLEThe @code{SAMPLE} structure is used for sound effects and module samples aswell. You can play with the following fields:@table @code@item SWORD panningPanning value of the sample. Valid values range from PAN_LEFT (0) toPAN_RIGHT (255), or PAN_SURROUND.@item ULONG speedPlaying frequency of the sample, it hertz.@item UBYTE volumeSample volume. Valid range is 0-64.@item UWORD flagsSeveral format flags or'ed together describing the format of the sample inmemory.Format flags:@table @samp@item SF_16BITSIf set, sample data is 16 bit wide; otherwise, it is 8 bit wide.@item SF_BIG_ENDIANIf set, sample data is in big--endian (Motorola) format; otherwise, it is inlittle--endian (Intel) format.@item SF_DELTAIf set, sample is stored as delta values (differences between two consecutivesamples); otherwise, sample is stored as sample values.@item SF_ITPACKEDIf set, sample data is packed with Impulse Tracker's compression method;otherwise, sample is not packed.@item SF_SIGNEDIf set, sample data is made of signed values; otherwise, it is made ofunsigned values.@item SF_STEREOIf set, sample data is stereo (two channels); otherwise, it is mono.@end table@*Playback flags:@table @samp@item SF_BIDIIf set, sample loops ``ping pong'' (back and forth).@item SF_LOOPIf set, sample loops forward.@item SF_REVERSEIf set, sample plays backwards.@end table@item UWORD inflagsSame as ``flags'', but describing the format of the sample on disk.@item ULONG lengthLength of the sample, in @emph{samples}. The length of a sample is 8 bits(1 byte) for a 8 bit sample, and 16 bits (2 bytes) for a 16 bit sample.@item ULONG loopstartLoop starting position, relative to the start of the sample, in samples.@item ULONG loopendLoop ending position, relative to the start of the sample, in samples.@end table@subsection MREADER@tindex MREADERThe @code{MREADER} contains the following function pointers:@table @code@item BOOL (*Seek)(struct MREADER*, long offset, int whence)This function should have the same behaviour as @code{fseek}, with offset 0meaning the start of the object (module, sample) being loaded.@item long (*Tell)(struct MREADER*)This function should have the same behaviour as @code{ftell}, with offset 0meaning the start of the object being loaded.@item BOOL (*Read)(struct MREADER*, void *dest, size_t length)This function should copy @code{length} bytes of data into @code{dest}, andreturn zero if an error occured, and any nonzero value otherwise. Note that anend-of-file condition will not be considered as an error in this case.@item int (*Get)(struct MREADER*)This function should have the same behaviour as @code{fgetc}.@item BOOL (*Eof)(struct MREADER*)This function should have the same behaviour as @code{feof}.@end tableFor an example of how to build an @code{MREADER} object, please refer to the@code{MFILEREADER} object in file @code{mmio/mmio.c} in the library sources.@subsection MWRITER@tindex MWRITERThe @code{MREADER} contains the following function pointers:@table @code@item BOOL (*Seek)(struct MWRITER*, long offset, int whence);This function should have the same behaviour as @code{fseek}, with offset 0meaning the start of the object being written.@item long (*Tell)(struct MWRITER*);This function should have the same behaviour as @code{ftell}, with offset 0meaning the start of the object being written.@item BOOL (*Write)(struct MWRITER*, void *dest, size_t length);This function should copy @code{length} bytes of data from @code{dest}, andreturn zero if an error occured, and any nonzero value otherwise.@item BOOL (*Put)(struct MWRITER*, int data);This function should have the same behaviour as @code{fputc}.@end table

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -