Skip to content

Commit 0786f88

Browse files
committed
MeasuringStream provide framesPerSecond
1 parent 6fd2fb9 commit 0786f88

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/AudioTools/CoreAudio/AudioStreams.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,12 @@ class MeasuringStream : public ModifyingStream {
735735
return bytes_per_second;
736736
}
737737

738+
/// Returns the actual thrughput in frames (samples) per second
739+
int framesPerSecond() {
740+
if (frame_size==0) return 0;
741+
return bytes_per_second/frame_size;
742+
}
743+
738744
/// Provides the time when the last measurement was started
739745
uint32_t startTime() {
740746
return start_time;

0 commit comments

Comments
 (0)