| 79 | } |
| 80 | |
| 81 | size_t SFXVorbisStream::_read_func( void *ptr, size_t size, size_t nmemb, void *datasource ) |
| 82 | { |
| 83 | Stream *stream = reinterpret_cast<Stream*>( datasource ); |
| 84 | |
| 85 | // Stream::read() returns true if any data was |
| 86 | // read, so we must track the read bytes ourselves. |
| 87 | U32 startByte = stream->getPosition(); |
| 88 | stream->read( size * nmemb, ptr ); |
| 89 | U32 endByte = stream->getPosition(); |
| 90 | |
| 91 | // How many did we actually read? |
| 92 | U32 readBytes = ( endByte - startByte ); |
| 93 | U32 readItems = readBytes / size; |
| 94 | |
| 95 | return readItems; |
| 96 | } |
| 97 | |
| 98 | S32 SFXVorbisStream::_seek_func( void *datasource, ogg_int64_t offset, S32 whence ) |
| 99 | { |
nothing calls this directly
no test coverage detected