mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 08:44:19 -04:00
fix Linux compile error
This commit is contained in:
parent
5a82dc9b1f
commit
e5c4c10e20
@ -298,7 +298,7 @@ WavAudioCursor::
|
||||
void WavAudioCursor::
|
||||
seek(double t) {
|
||||
t = max(t, 0.0);
|
||||
streampos pos = _data_start + (streampos) min(t * _byte_rate, _data_size);
|
||||
streampos pos = _data_start + min((size_t) (t * _byte_rate), _data_size);
|
||||
|
||||
if (_can_seek_fast) {
|
||||
_stream->seekg(pos);
|
||||
@ -338,7 +338,7 @@ seek(double t) {
|
||||
void WavAudioCursor::
|
||||
read_samples(int n, PN_int16 *data) {
|
||||
int desired = n * _audio_channels;
|
||||
int read_samples = min(desired, (_data_size - _data_pos) / _bytes_per_sample);
|
||||
int read_samples = min(desired, ((int) (_data_size - _data_pos)) / _bytes_per_sample);
|
||||
|
||||
if (read_samples <= 0) {
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user