these functions are the 'simplified' stream interface from Jeff (most of this code is from Jeff)
| 944 | } |
| 945 | // these functions are the 'simplified' stream interface from Jeff (most of this code is from Jeff) |
| 946 | int StreamPlay(const char *filename, float volume, int flags) { |
| 947 | int retval = -1; |
| 948 | try { |
| 949 | flags = 0; |
| 950 | User_audio_stream.Close(); |
| 951 | User_audio_stream.Open(filename, STRM_OPNF_ONETIME); |
| 952 | Stream_volume = volume; |
| 953 | User_audio_stream.SetVolume(Stream_volume * Stream_master_volume); |
| 954 | User_audio_stream.Play(true); // start this stream on the next frame. |
| 955 | retval = User_audio_stream.m_streamindex; |
| 956 | } catch (...) { |
| 957 | return -1; |
| 958 | } |
| 959 | return retval; |
| 960 | } |
| 961 | void StreamStop(int handle) { |
| 962 | if (handle > -1) { |
| 963 | if (AudioStream::m_streams[handle]) |
no test coverage detected