本文整理汇总了C++中MikMod_free函数的典型用法代码示例。如果您正苦于以下问题:C++ MikMod_free函数的具体用法?C++ MikMod_free怎么用?C++ MikMod_free使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了MikMod_free函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: AMF_Cleanup
static void AMF_Cleanup(void)
{
MikMod_free(mh);
MikMod_free(track);
mh=NULL;
track=NULL;
}
开发者ID:OS2World,项目名称:LIB-SDL-2014,代码行数:7,代码来源:load_amf.c
示例2: S3M_Cleanup
void S3M_Cleanup(void)
{
MikMod_free(s3mbuf);
MikMod_free(paraptr);
MikMod_free(poslookup);
MikMod_free(mh);
MikMod_free(origpositions);
}
开发者ID:Serosis,项目名称:UQM-MegaMod,代码行数:8,代码来源:load_s3m.c
示例3: IMF_Cleanup
static void IMF_Cleanup(void)
{
FreeLinear();
MikMod_free(imfpat);
MikMod_free(mh);
imfpat=NULL;
mh=NULL;
}
开发者ID:OS2World,项目名称:LIB-SDL-2014,代码行数:9,代码来源:load_imf.c
示例4: STX_Cleanup
static void STX_Cleanup(void)
{
MikMod_free(stxbuf);
MikMod_free(paraptr);
MikMod_free(poslookup);
MikMod_free(mh);
stxbuf=NULL;
paraptr=NULL;
poslookup=NULL;
mh=NULL;
}
开发者ID:OS2World,项目名称:LIB-SDL-2014,代码行数:11,代码来源:load_stx.c
示例5: MikMod_Exit_internal
void MikMod_Exit_internal(void)
{
MikMod_DisableOutput_internal();
md_driver->Exit();
md_numchn = md_sfxchn = md_sngchn = 0;
md_driver = &drv_nos;
if(sfxinfo) MikMod_free(sfxinfo);
if(md_sample) MikMod_free(md_sample);
md_sample = NULL;
sfxinfo = NULL;
initialized = 0;
}
开发者ID:mistydemeo,项目名称:libmikmod,代码行数:14,代码来源:mdriver.c
示例6: pipe_Exit
static void pipe_Exit(void)
{
#if defined unix || (defined __APPLE__ && defined __MACH__)
int pstat;
pid_t pid2;
#endif
VC_Exit();
MikMod_free(audiobuffer);
if(pipeout) {
_mm_delete_file_writer(pipeout);
pipeout=NULL;
}
if(pipefile) {
#if !defined unix && (!defined __APPLE__ || !defined __MACH__)
#ifdef __WATCOMC__
_pclose(pipefile);
#else
pclose(pipefile);
#endif
#ifdef __EMX__
_fsetmode(stdout,"t");
#endif
#else
fclose(pipefile);
do {
pid2=waitpid(pid,&pstat,0);
} while (pid2==-1 && errno==EINTR);
#endif
pipefile=NULL;
}
}
开发者ID:LighFusion,项目名称:surreal,代码行数:32,代码来源:drv_pipe.c
示例7: MikMod_SetNumVoices_internal
/* If either parameter is -1, the current set value will be retained. */
BOOL MikMod_SetNumVoices_internal(int music, int sfx)
{
BOOL resume = 0;
int t, oldchn = 0;
if((!music)&&(!sfx)) return 1;
_mm_critical = 1;
if(isplaying) {
MikMod_DisableOutput_internal();
oldchn = md_numchn;
resume = 1;
}
if(sfxinfo) MikMod_free(sfxinfo);
if(md_sample) MikMod_free(md_sample);
md_sample = NULL;
sfxinfo = NULL;
if(music!=-1) md_sngchn = music;
if(sfx!=-1) md_sfxchn = sfx;
md_numchn = md_sngchn + md_sfxchn;
LimitHardVoices(md_driver->HardVoiceLimit);
LimitSoftVoices(md_driver->SoftVoiceLimit);
if(md_driver->SetNumVoices()) {
MikMod_Exit_internal();
if(_mm_errno)
if(_mm_errorhandler!=NULL) _mm_errorhandler();
md_numchn = md_softchn = md_hardchn = md_sfxchn = md_sngchn = 0;
return 1;
}
if(md_sngchn+md_sfxchn)
md_sample=(SAMPLE**)MikMod_calloc(md_sngchn+md_sfxchn,sizeof(SAMPLE*));
if(md_sfxchn)
sfxinfo = (UBYTE *)MikMod_calloc(md_sfxchn,sizeof(UBYTE));
/* make sure the player doesn't start with garbage */
for(t=oldchn;t<md_numchn;t++) Voice_Stop_internal(t);
sfxpool = 0;
if(resume) MikMod_EnableOutput_internal();
_mm_critical = 0;
return 0;
}
开发者ID:mistydemeo,项目名称:libmikmod,代码行数:48,代码来源:mdriver.c
示例8: stdout_Exit
static void stdout_Exit(void)
{
VC_Exit();
#ifdef __EMX__
_fsetmode(stdout,"t");
#endif
MikMod_free(audiobuffer);
audiobuffer=NULL;
}
开发者ID:OS2World,项目名称:LIB-SDL-2014,代码行数:9,代码来源:drv_stdout.c
示例9: AIX_Exit
static void AIX_Exit(void)
{
VC_Exit();
if (fd>=0) {
close(fd);
fd=-1;
}
MikMod_free(audiobuffer);
}
开发者ID:mistydemeo,项目名称:libmikmod,代码行数:9,代码来源:drv_aix.c
示例10: pipe_CommandLine
static void pipe_CommandLine(CHAR *cmdline)
{
CHAR *ptr=MD_GetAtom("pipe",cmdline,0);
if(ptr) {
MikMod_free(target);
target=ptr;
}
}
开发者ID:LighFusion,项目名称:surreal,代码行数:9,代码来源:drv_pipe.c
示例11: ESD_CommandLine
static void ESD_CommandLine(const CHAR *cmdline)
{
CHAR *ptr=MD_GetAtom("machine",cmdline,0);
if (ptr) {
MikMod_free(espeaker);
espeaker=ptr;
}
}
开发者ID:OS2World,项目名称:LIB-SDL-2014,代码行数:9,代码来源:drv_esd.c
示例12: AF_CommandLine
static void AF_CommandLine(CHAR *cmdline)
{
CHAR *machine=MD_GetAtom("machine",cmdline,0);
if(machine) {
if(soundbox) MikMod_free(soundbox);
soundbox=machine;
}
}
开发者ID:mistydemeo,项目名称:libmikmod,代码行数:9,代码来源:drv_AF.c
示例13: WAV_CommandLine
static void WAV_CommandLine(const CHAR *cmdline)
{
CHAR *ptr=MD_GetAtom("file",cmdline,0);
if(ptr) {
MikMod_free(filename);
filename=ptr;
}
}
开发者ID:OS2World,项目名称:LIB-SDL-2014,代码行数:9,代码来源:drv_wav.c
示例14: commandLine
static void commandLine(CHAR *cmdline)
{
CHAR *ptr;
if((ptr=MD_GetAtom("card", cmdline, 0))) {
card=atoi(ptr);
MikMod_free(ptr);
}
}
开发者ID:mistydemeo,项目名称:libmikmod,代码行数:9,代码来源:drv_sam9407.c
示例15: ALSA_Exit_internal
static void ALSA_Exit_internal(void)
{
VC_Exit();
if (pcm_h) {
alsa_pcm_drain_playback(pcm_h);
alsa_pcm_close(pcm_h);
pcm_h=NULL;
}
MikMod_free(audiobuffer);
}
开发者ID:idispatch,项目名称:libmikmod,代码行数:10,代码来源:drv_alsa.c
示例16: DS_CommandLine
static void DS_CommandLine(CHAR *cmdline)
{
CHAR *ptr=MD_GetAtom("buffer",cmdline,0);
if (ptr) {
int buf=atoi(ptr);
if ((buf<12)||(buf>19)) buf=FRAGSIZE;
fragsize=1<<buf;
MikMod_free(ptr);
}
if ((ptr=MD_GetAtom("globalfocus",cmdline,1))) {
controlflags |= DSBCAPS_GLOBALFOCUS;
MikMod_free(ptr);
} else
controlflags &= ~DSBCAPS_GLOBALFOCUS;
}
开发者ID:mistydemeo,项目名称:libmikmod,代码行数:19,代码来源:drv_ds.c
示例17: ReadLinedComment
BOOL ReadLinedComment(UWORD len,UWORD linelen)
{
CHAR *tempcomment,*line,*storage;
UWORD total=0,t,lines;
int i;
lines = (len + linelen - 1) / linelen;
if (len) {
if(!(tempcomment=(CHAR*)MikMod_malloc(len+1))) return 0;
if(!(storage=(CHAR*)MikMod_malloc(linelen+1))) {
MikMod_free(tempcomment);
return 0;
}
memset(tempcomment, ' ', len);
_mm_read_UBYTES(tempcomment,len,modreader);
/* compute message length */
for(line=tempcomment,total=t=0;t<lines;t++,line+=linelen) {
for(i=linelen;(i>=0)&&(line[i]==' ');i--) line[i]=0;
for(i=0;i<linelen;i++) if (!line[i]) break;
total+=1+i;
}
if(total>lines) {
if(!(of.comment=(CHAR*)MikMod_malloc(total+1))) {
MikMod_free(storage);
MikMod_free(tempcomment);
return 0;
}
/* convert message */
for(line=tempcomment,t=0;t<lines;t++,line+=linelen) {
for(i=0;i<linelen;i++) if(!(storage[i]=line[i])) break;
storage[i]=0; /* if (i==linelen) */
strcat(of.comment,storage);strcat(of.comment,"\r");
}
MikMod_free(storage);
MikMod_free(tempcomment);
}
}
return 1;
}
开发者ID:idispatch,项目名称:libmikmod,代码行数:42,代码来源:mloader.c
示例18: ALSA_CommandLine
static void ALSA_CommandLine(CHAR *cmdline)
{
CHAR *ptr;
if((ptr=MD_GetAtom("card",cmdline,0))) {
cardmin=atoi(ptr);cardmax=cardmin+1;
MikMod_free(ptr);
} else {
cardmin=0;cardmax=SND_CARDS;
}
if((ptr=MD_GetAtom("pcm",cmdline,0))) {
device=atoi(ptr);
MikMod_free(ptr);
} else device=-1;
if((ptr=MD_GetAtom("buffer",cmdline,0))) {
numfrags=atoi(ptr);
if ((numfrags<2)||(numfrags>16)) numfrags=DEFAULT_NUMFRAGS;
MikMod_free(ptr);
} else numfrags=DEFAULT_NUMFRAGS;
}
开发者ID:idispatch,项目名称:libmikmod,代码行数:20,代码来源:drv_alsa.c
示例19: ALSA_Exit_internal
static void ALSA_Exit_internal(void)
{
enabled = 0;
VC_Exit();
if (pcm_h) {
alsa_pcm_drain(pcm_h);
alsa_pcm_close(pcm_h);
pcm_h = NULL;
}
MikMod_free(audiobuffer);
audiobuffer = NULL;
}
开发者ID:OS2World,项目名称:LIB-SDL-2014,代码行数:12,代码来源:drv_alsa.c
示例20: AIX_CommandLine
static void AIX_CommandLine(CHAR *cmdline)
{
char *buffer=MD_GetAtom("buffer",cmdline,0);
if(buffer) {
int buf=atoi(buffer);
if((buf<12)||(buf>19)) buf=BUFFERSIZE;
buffersize=1<<buf;
MikMod_free(buffer);
}
}
开发者ID:mistydemeo,项目名称:libmikmod,代码行数:13,代码来源:drv_aix.c
注:本文中的MikMod_free函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论