|
Wing Commander II
Reconstructed Win32 source (1996)
|
Worker thread and asynchronous audio chunk delivery. More...
Go to the source code of this file.
Macros | |
| #define | IX_THREAD_CPP |
| #define | IX_THREAD_FILE "D:\\Rnd\\Prj\\ix\\Src\\Streamer\\thread.cpp" |
Functions | |
| DWORD WINAPI | ix_streamer_thread_proc (void *parameter) |
| unsigned int | ix_streamer_service_audio (void) |
| void | ix_thread_handle_file_chunk (IxStreamFile *streamFile) |
| int | ix_dsps_get_buffer_free (int stream) |
| void | ix_dsps_unlock (int stream) |
| unsigned int | ix_thread_service_streams (void) |
| void | ix_thread_advance_audio_chunk (void) |
| void | ix_thread_lock_stream_buffer (void) |
| unsigned int | ix_thread_get_audio_chunk_size (void) |
Worker thread and asynchronous audio chunk delivery.
Definition in file thread.cpp.
| #define IX_THREAD_CPP |
Definition at line 11 of file thread.cpp.
| #define IX_THREAD_FILE "D:\\Rnd\\Prj\\ix\\Src\\Streamer\\thread.cpp" |
Definition at line 18 of file thread.cpp.
Referenced by ix_thread_handle_file_chunk(), and ix_thread_lock_stream_buffer().
| int ix_dsps_get_buffer_free | ( | int | stream | ) |
Definition at line 223 of file dsps.cpp.
References IxStream::buffer, IxVoice::cursor, g_1_streams, g_2_voices, g_3_nStreamCount, g_nVoiceCapacity, IX_DSPS_FILE, ix_dsps_get_buffer_free(), ix_log_printf(), IX_STREAM_ALLOCATED, IxStream::pending, IxStream::playPos, and IxStream::size.
Referenced by ix_dsps_get_buffer_free(), ix_streamer_service_audio(), and ix_thread_service_streams().
| void ix_dsps_unlock | ( | int | stream | ) |
Definition at line 296 of file dsps.cpp.
References IxStream::flags, g_1_streams, g_3_nStreamCount, IX_DSPS_FILE, ix_dsps_unlock(), ix_log_printf(), IX_STREAM_ALLOCATED, IX_STREAM_LOCKED, IxStream::lockLen, IxStream::pending, IxStream::size, and IxStream::writePos.
Referenced by ix_dsps_unlock(), and ix_thread_lock_stream_buffer().
| unsigned int ix_streamer_service_audio | ( | void | ) |
Definition at line 96 of file thread.cpp.
References IxStreamerHeader::audioBufferSize, g_16_nStreamerBytesEachSecond, g_dwStreamerMode, g_pStreamPrologue, ix_dsps_get_buffer_free(), ix_dsps_play(), ix_dsps_prepare(), ix_dsps_stop(), IX_STREAMER_DSP_PLAYING, IX_STREAMER_END_TRIGGERED, ix_streamer_service_audio(), ix_thread_get_audio_chunk_size(), ix_thread_lock_stream_buffer(), and ix_thread_service_streams().
Referenced by ix_streamer_service_audio(), and ix_streamer_thread_proc().
| DWORD WINAPI ix_streamer_thread_proc | ( | void * | parameter | ) |
Definition at line 21 of file thread.cpp.
References g_18_dwStreamerThreadTick, g_1_csStreamer, g_1_hStreamRouseEvent, g_49_csStreamWorker, g_dwStreamerMode, ix_dsps_play(), ix_dsps_prepare(), ix_dsps_stop(), IX_STREAMER_AUDIO_PAUSED, IX_STREAMER_AUDIO_PLAYING, IX_STREAMER_DSP_PAUSED, IX_STREAMER_DSP_PLAYING, IX_STREAMER_END_TRIGGERED, IX_STREAMER_FILE_OPEN, IX_STREAMER_HAS_AUDIO, IX_STREAMER_REPREPARE_AUDIO, ix_streamer_service_audio(), IX_STREAMER_SHUTDOWN, ix_streamer_thread_proc(), IX_STREAMER_THREAD_RUNNING, ix_thread_service_streams(), and void().
Referenced by ix_streamer_init(), and ix_streamer_thread_proc().
Definition at line 290 of file thread.cpp.
References IxStreamerBranch::audioChunk, IxStreamerTrigger::audioChunk, IxStreamerHeader::audioChunkCount, IxStreamerAudioChunk::branchCount, IxStreamerAudioChunk::firstBranch, IxStreamerAudioChunk::firstTrigger, g_13_adwPlayerBranchingStack, g_15_pStreamerSoundChunks, g_6_bFeederLevel, g_6_dwStreamSoundChunk, g_6_pFeederTriggers, g_7_pStreamBranches, g_cStreamerBranchTag, g_dwStreamerMode, g_nStreamerBranchStackIndex, g_pStreamPrologue, IxStreamerBranch::intensity, ix_thread_advance_audio_chunk(), and IxStreamerAudioChunk::triggerCount.
Referenced by ix_thread_advance_audio_chunk(), and ix_thread_lock_stream_buffer().
| unsigned int ix_thread_get_audio_chunk_size | ( | void | ) |
Definition at line 405 of file thread.cpp.
References IxStreamerAudioChunk::fileEnd, IxStreamerAudioChunk::fileOffset, g_15_pStreamerSoundChunks, g_6_dwStreamSoundChunk, and ix_thread_get_audio_chunk_size().
Referenced by ix_streamer_service_audio(), ix_thread_get_audio_chunk_size(), ix_thread_lock_stream_buffer(), and ix_thread_service_streams().
| void ix_thread_handle_file_chunk | ( | IxStreamFile * | streamFile | ) |
Definition at line 124 of file thread.cpp.
References IxStreamerFileEntry::chunkCount, IxStreamFile::completionEvent, IxStreamFile::destination, IxStreamFile::entry, IxStreamFile::file, IxStreamerFileChunk::fileEnd, IxStreamerFileChunk::fileOffset, IxStreamerFileEntry::firstChunk, IxStreamerFileChunk::firstPacket, IxStreamFile::flags, g_126_pReaderCompressedBuf, g_17_pStreamerFileParts, g_18_dwStreamerThreadTick, g_1_pFeederPackageDisk, g_1_pPlayerReadQueue, g_48_pPumpIdleFiles, g_7_pStreamerPacketOffsets, g_csStreamerFileFifo, g_dwStreamerMode, g_nSpoolerDiskChunk, g_pStreamerFileStore, ix_file_read(), ix_file_seek(), ix_file_tell(), ix_log_printf(), ix_lzo1x_decompress(), IX_STREAM_FILE_READING, IX_THREAD_FILE, ix_thread_handle_file_chunk(), IxStreamFile::next, IxStreamerFileChunk::packedSize, IxStreamerFileChunk::packetCount, IxStreamFile::position, IxStreamFile::previous, IxStreamFile::remaining, and IxStreamFile::serviceTick.
Referenced by ix_thread_handle_file_chunk(), and ix_thread_service_streams().
Definition at line 375 of file thread.cpp.
References IxStreamerAudioChunk::fileOffset, g_15_pStreamerSoundChunks, g_1_pFeederPackageDisk, g_6_dwStreamSoundChunk, ix_dsps_lock(), ix_dsps_unlock(), ix_file_read(), ix_file_seek(), ix_log_printf(), ix_thread_advance_audio_chunk(), IX_THREAD_FILE, ix_thread_get_audio_chunk_size(), and ix_thread_lock_stream_buffer().
Referenced by ix_streamer_service_audio(), and ix_thread_lock_stream_buffer().
| unsigned int ix_thread_service_streams | ( | void | ) |
Definition at line 247 of file thread.cpp.
References g_16_nStreamerBytesEachSecond, g_1_pPlayerReadQueue, g_csStreamerFileFifo, g_dwStreamerMode, ix_dsps_get_buffer_free(), ix_thread_get_audio_chunk_size(), ix_thread_handle_file_chunk(), ix_thread_service_streams(), IxStreamFile::previous, IxStreamFile::priority, and IxStreamFile::serviceTick.
Referenced by ix_streamer_service_audio(), ix_streamer_thread_proc(), and ix_thread_service_streams().