MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / SFXAsyncStream

Method SFXAsyncStream

Engine/source/sfx/sfxInternal.cpp:50–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48//--------------------------------------------------------------------------
49
50SFXAsyncStream::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

Callers

nothing calls this directly

Calls 6

getBytesPerSampleMethod · 0.80
getSamplesPerSecondMethod · 0.45
getFormatMethod · 0.45
getDataLengthMethod · 0.45
ptrMethod · 0.45
getPositionMethod · 0.45

Tested by

no test coverage detected