Please help me figure why there's no sound on device or sim (I am compiling and using bass and there's no errors and bass isnt returning errors)
// initialize default output device
if (!BASS_Init(-1,44100,0,0,NULL))
{
Log("Can't initialize device");
return;
}
NSString *resourcePath = [[NSBundle mainBundle] resourcePath];
[[NSFileManager defaultManager] changeCurrentDirectoryPath:resourcePath];
//log
Log("LoadSample("+filename+")");
//temp
sSound sound;
//filename
sound.filename = filename;
//flags
int flags = 0;
if (looping)
{
flags = BASS_SAMPLE_LOOP;
}
//load and return
char* cstring = (char*)filename.c_str();
sound.data = BASS_SampleLoad(FALSE, cstring, 0, 0, 1, 0);//flags|BASS_SAMPLE_OVER_POS);
if (sound.data == 0) Log("Failed to load sample.");
//Tried HCHANNEL with no luck too
HSTREAM channel = BASS_SampleGetChannel(sound.data, TRUE); // get a sample channel
bool success = BASS_ChannelPlay(channel, FALSE); // play it - second param good for machine guns or stuff
if (channel && success)
{
Log("PlaySampleChannel("+sound.filename+")");
}
else
{
Log("PlaySampleChannel("+sound.filename+") FAILED.");
}