mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-04-24 01:06:39 +00:00
Calculate a proper value for the sample buffer (48000 Hz * 2 bytes per sample * 2.5 ms)
This commit is contained in:
@@ -28,9 +28,9 @@ int nv_opus_get_channel_count(void) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This number assumes 2 channels at 48 KHz
|
// This number assumes 16-bit samples at 48 KHz with 2.5 ms frames
|
||||||
int nv_opus_get_max_out_shorts(void) {
|
int nv_opus_get_max_out_shorts(void) {
|
||||||
return 512*nv_opus_get_channel_count();
|
return 240*nv_opus_get_channel_count();
|
||||||
}
|
}
|
||||||
|
|
||||||
// The Opus stream is 48 KHz
|
// The Opus stream is 48 KHz
|
||||||
|
|||||||
Reference in New Issue
Block a user