|
Wing Commander
Reconstructed Win32 source (1996)
|
The streamer's worker thread. More...
#include "ix.h"#include <stdlib.h>#include <string.h>#include <process.h>#include <crtdbg.h>#include <fcntl.h>Go to the source code of this file.
Macros | |
| #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) |
| 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) |
The streamer's worker thread.
Originally D:\Rnd\Prj\ix\Src\Streamer\thread.cpp, address range 443b10-4446ff. INT3 fill separates it from the streamer API and the stream-file methods; its assert paths anchor the interior.
Definition in file thread.cpp.
| #define IX_THREAD_FILE "D:\\Rnd\\Prj\\ix\\Src\\Streamer\\thread.cpp" |
Definition at line 19 of file thread.cpp.
Referenced by ix_thread_handle_file_chunk(), and ix_thread_lock_stream_buffer().
| unsigned int ix_streamer_service_audio | ( | void | ) |
Definition at line 97 of file thread.cpp.
References IxStreamerHeader::audioBufferSize, dwIxStreamerStatus, dwStreamBytesPerSecond, 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(), ix_thread_service_streams(), and pStreamerPackageInfo.
Referenced by ix_streamer_service_audio(), and ix_streamer_thread_proc().
| DWORD WINAPI ix_streamer_thread_proc | ( | void * | parameter | ) |
Definition at line 22 of file thread.cpp.
References csIxStreamerThread, csStreamer, dwIxStreamerStatus, dwStreamThreadTick, hStreamerWakeupEvent, 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 289 of file thread.cpp.
References adwStreamCallStack, IxStreamerBranch::audioChunk, IxStreamerTrigger::audioChunk, IxStreamerHeader::audioChunkCount, IxStreamerAudioChunk::branchCount, bStreamerIntensityLevel, cStreamerBranchTag, dwIxStreamerStatus, IxStreamerAudioChunk::firstBranch, IxStreamerAudioChunk::firstTrigger, IxStreamerBranch::intensity, ix_thread_advance_audio_chunk(), nStreamCallStackIndex, nStreamerAudioBlock, pMusicStreamBranchList, pStreamedMusicAudioChunks, pStreamerPackageInfo, pStreamTriggerList, 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 402 of file thread.cpp.
References IxStreamerAudioChunk::fileEnd, IxStreamerAudioChunk::fileOffset, ix_thread_get_audio_chunk_size(), nStreamerAudioBlock, and pStreamedMusicAudioChunks.
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 125 of file thread.cpp.
References IxStreamerFileEntry::chunkCount, IxStreamFile::completionEvent, csStreamerFileList, IxStreamFile::destination, dwIxStreamerStatus, dwStreamThreadTick, IxStreamFile::entry, IxStreamFile::file, IxStreamerFileChunk::fileEnd, IxStreamerFileChunk::fileOffset, IxStreamerFileEntry::firstChunk, IxStreamerFileChunk::firstPacket, IxStreamFile::flags, 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, nIxStreamerCurrentFileChunk, IxStreamerFileChunk::packedSize, IxStreamerFileChunk::packetCount, pIxStreamerInputBuffer, IxStreamFile::position, IxStreamFile::previous, pStreamerLzoBuffer, pStreamerPacketOffsetTable, pStreamerPackFile, pStreamFileBlocks, pStreamIdleFiles, pStreamReadRequests, IxStreamFile::remaining, and IxStreamFile::serviceTick.
Referenced by ix_thread_handle_file_chunk(), and ix_thread_service_streams().
Definition at line 372 of file thread.cpp.
References IxStreamerAudioChunk::fileOffset, 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(), ix_thread_lock_stream_buffer(), nStreamerAudioBlock, pStreamedMusicAudioChunks, and pStreamerPackFile.
Referenced by ix_streamer_service_audio(), and ix_thread_lock_stream_buffer().
| unsigned int ix_thread_service_streams | ( | void | ) |
Definition at line 245 of file thread.cpp.
References csStreamerFileList, dwIxStreamerStatus, dwStreamBytesPerSecond, ix_dsps_get_buffer_free(), ix_thread_get_audio_chunk_size(), ix_thread_handle_file_chunk(), ix_thread_service_streams(), IxStreamFile::previous, IxStreamFile::priority, pStreamReadRequests, and IxStreamFile::serviceTick.
Referenced by ix_streamer_service_audio(), ix_streamer_thread_proc(), and ix_thread_service_streams().