public RESULT createStream(string name_or_data, MODE mode, ref Sound sound) { RESULT result = RESULT.OK; IntPtr soundraw = new IntPtr(); Sound soundnew = null; mode = mode | MODE.UNICODE; try { result = FMOD_System_CreateStream(systemraw, name_or_data, mode, 0, ref soundraw); } catch { result = RESULT.ERR_INVALID_PARAM; } if (result != RESULT.OK) { return result; } if (sound == null) { soundnew = new Sound(); soundnew.setRaw(soundraw); sound = soundnew; } else { sound.setRaw(soundraw); } return result; }
public RESULT getSound(int index, ref Sound sound) { RESULT result = RESULT.OK; IntPtr soundraw = new IntPtr(); Sound soundnew = null; try { result = FMOD_SoundGroup_GetSound(soundgroupraw, index, ref soundraw); } catch { result = RESULT.ERR_INVALID_PARAM; } if (result != RESULT.OK) { return result; } if (sound == null) { soundnew = new Sound(); soundnew.setRaw(soundraw); sound = soundnew; } else { sound.setRaw(soundraw); } return result; }
public RESULT createStream(byte[] data, MODE mode, ref CREATESOUNDEXINFO exinfo, ref Sound sound) { RESULT result = RESULT.OK; IntPtr soundraw = new IntPtr(); Sound soundnew = null; try { result = FMOD_System_CreateStream(systemraw, data, mode, ref exinfo, ref soundraw); } catch { result = RESULT.ERR_INVALID_PARAM; } if (result != RESULT.OK) { return result; } if (sound == null) { soundnew = new Sound(); soundnew.setRaw(soundraw); sound = soundnew; } else { sound.setRaw(soundraw); } return result; }
public RESULT getCurrentSound(ref Sound sound) { RESULT result = RESULT.OK; IntPtr soundraw = new IntPtr(); Sound soundnew = null; try { result = FMOD_Channel_GetCurrentSound(channelraw, ref soundraw); } catch { result = RESULT.ERR_INVALID_PARAM; } if (result != RESULT.OK) { return result; } if (sound == null) { soundnew = new Sound(); soundnew.setRaw(soundraw); sound = soundnew; } else { sound.setRaw(soundraw); } return result; }