MCPcopy Create free account
hub / github.com/SFML/SFML / seek

Method seek

src/SFML/Audio/SoundFileReaderWav.cpp:177–184  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

175
176////////////////////////////////////////////////////////////
177void SoundFileReaderWav::seek(std::uint64_t sampleOffset)
178{
179 assert(m_decoder && "wav decoder not initialized. Call SoundFileReaderWav::open() to initialize it.");
180
181 if (const ma_result result = ma_decoder_seek_to_pcm_frame(&*m_decoder, sampleOffset / m_channelCount);
182 result != MA_SUCCESS)
183 err() << "Failed to seek wav sound stream: " << ma_result_description(result) << std::endl;
184}
185
186
187////////////////////////////////////////////////////////////

Callers 1

onSeekFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected