fix return value for playback/capture buffer loads on audio tracks with no channels
This commit is contained in:
parent
d3447dfd15
commit
91f2f46a0a
@ -2237,11 +2237,11 @@ AudioDiskstream::playback_buffer_load () const
|
|||||||
boost::shared_ptr<ChannelList> c = channels.reader();
|
boost::shared_ptr<ChannelList> c = channels.reader();
|
||||||
|
|
||||||
if (c->empty ()) {
|
if (c->empty ()) {
|
||||||
return 0;
|
return 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (float) ((double) c->front()->playback_buf->read_space()/
|
return (float) ((double) c->front()->playback_buf->read_space()/
|
||||||
(double) c->front()->playback_buf->bufsize());
|
(double) c->front()->playback_buf->bufsize());
|
||||||
}
|
}
|
||||||
|
|
||||||
float
|
float
|
||||||
@ -2250,7 +2250,7 @@ AudioDiskstream::capture_buffer_load () const
|
|||||||
boost::shared_ptr<ChannelList> c = channels.reader();
|
boost::shared_ptr<ChannelList> c = channels.reader();
|
||||||
|
|
||||||
if (c->empty ()) {
|
if (c->empty ()) {
|
||||||
return 0;
|
return 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (float) ((double) c->front()->capture_buf->write_space()/
|
return (float) ((double) c->front()->capture_buf->write_space()/
|
||||||
|
Loading…
Reference in New Issue
Block a user