mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 06:21:26 +12:00
recording: fix default sample rate
This commit is contained in:
parent
64529cefa5
commit
42cd7df813
1 changed files with 2 additions and 2 deletions
|
@ -302,12 +302,12 @@ namespace utils
|
||||||
static int select_sample_rate(const AVCodec* codec)
|
static int select_sample_rate(const AVCodec* codec)
|
||||||
{
|
{
|
||||||
if (!codec->supported_samplerates)
|
if (!codec->supported_samplerates)
|
||||||
return 44100;
|
return 48000;
|
||||||
|
|
||||||
int best_samplerate = 0;
|
int best_samplerate = 0;
|
||||||
for (const int* samplerate = codec->supported_samplerates; samplerate && *samplerate != 0; samplerate++)
|
for (const int* samplerate = codec->supported_samplerates; samplerate && *samplerate != 0; samplerate++)
|
||||||
{
|
{
|
||||||
if (!best_samplerate || abs(44100 - *samplerate) < abs(44100 - best_samplerate))
|
if (!best_samplerate || abs(48000 - *samplerate) < abs(48000 - best_samplerate))
|
||||||
{
|
{
|
||||||
best_samplerate = *samplerate;
|
best_samplerate = *samplerate;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue