| 48 | //-------------------------------------------------------------------------- |
| 49 | |
| 50 | SFXAsyncStream::SFXAsyncStream( const SFXStreamRef& stream, |
| 51 | bool isIncremental, |
| 52 | U32 streamPacketLength, |
| 53 | U32 numReadAhead, |
| 54 | bool isLooping ) |
| 55 | : Parent( stream, |
| 56 | isIncremental |
| 57 | ? streamPacketLength |
| 58 | * stream->getFormat().getSamplesPerSecond() |
| 59 | * stream->getFormat().getBytesPerSample() // Streamed buffer; read in incremental packets. |
| 60 | : stream->getDataLength(), // Non-streamed buffer; read entire stream in one packet. |
| 61 | stream->getDataLength() // Read all remaining data in stream. |
| 62 | - ( dynamic_cast< IPositionable< U32 >* >( stream.ptr() ) |
| 63 | ? dynamic_cast< IPositionable< U32 >* >( stream.ptr() )->getPosition() |
| 64 | : 0 ), |
| 65 | numReadAhead, |
| 66 | isLooping, |
| 67 | &THREAD_POOL() ), |
| 68 | mReadSilenceAtEnd( false ) |
| 69 | { |
| 70 | } |
| 71 | |
| 72 | //-------------------------------------------------------------------------- |
| 73 |
nothing calls this directly
no test coverage detected