Ejemplo n.º 1
0
int AalibStop(int channel)
{
	if ((PSPAALIB_CHANNEL_WAV_1<=channel)&&(channel<=PSPAALIB_CHANNEL_WAV_32))
	{
		return StopWav(channel-PSPAALIB_CHANNEL_WAV_1);
	}
	if ((PSPAALIB_CHANNEL_OGG_1<=channel)&&(channel<=PSPAALIB_CHANNEL_OGG_10))
	{
		return StopOgg(channel-PSPAALIB_CHANNEL_OGG_1);
	}
	if ((PSPAALIB_CHANNEL_SCEMP3_1<=channel)&&(channel<=PSPAALIB_CHANNEL_SCEMP3_2))
	{
		return StopSceMp3(channel-PSPAALIB_CHANNEL_SCEMP3_1);
	}
	if ((PSPAALIB_CHANNEL_AT3_1<=channel)&&(channel<=PSPAALIB_CHANNEL_AT3_2))
	{
		return StopAt3(channel-PSPAALIB_CHANNEL_AT3_1);
	}
	return PSPAALIB_ERROR_INVALID_CHANNEL;
}
Ejemplo n.º 2
0
int UnloadSceMp3(int channel)
{
	if ((channel<0)||(channel>1))
	{
		return PSPAALIB_ERROR_SCEMP3_INVALID_CHANNEL;
	}
	StopSceMp3(channel);
	if (!streamsSceMp3[channel].initialized)
	{
		return PSPAALIB_SUCCESS;
	}
	sceMp3ReleaseMp3Handle(streamsSceMp3[channel].handle);
	sceIoClose(streamsSceMp3[channel].file);
	free(streamsSceMp3[channel].mp3Buf);
	free(streamsSceMp3[channel].pcmBuf);
	streamsSceMp3[channel].initialized=FALSE;
	streamsSceMp3[channel].paused=TRUE;
	streamsSceMp3[channel].stopReason=PSPAALIB_STOP_UNLOADED;
	return PSPAALIB_SUCCESS;
}