mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-15 18:16:44 +02:00
larger period time
This commit is contained in:
parent
e2d832ae56
commit
1c44c9128b
1 changed files with 3 additions and 4 deletions
|
@ -22,8 +22,8 @@
|
||||||
#include <alsa/asoundlib.h>
|
#include <alsa/asoundlib.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#define BUFFER_TIME 160000
|
//#define BUFFER_TIME 120000
|
||||||
#define PERIOD_TIME 20000
|
#define PERIOD_TIME 30000
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
@ -76,8 +76,7 @@ void Player::initAlsa()
|
||||||
if (period_time > PERIOD_TIME)
|
if (period_time > PERIOD_TIME)
|
||||||
period_time = PERIOD_TIME;
|
period_time = PERIOD_TIME;
|
||||||
|
|
||||||
unsigned int buffer_time = 4*period_time;
|
unsigned int buffer_time = 4 * period_time;
|
||||||
|
|
||||||
|
|
||||||
snd_pcm_hw_params_set_period_time_near(handle_, params, &period_time, 0);
|
snd_pcm_hw_params_set_period_time_near(handle_, params, &period_time, 0);
|
||||||
snd_pcm_hw_params_set_buffer_time_near(handle_, params, &buffer_time, 0);
|
snd_pcm_hw_params_set_buffer_time_near(handle_, params, &buffer_time, 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue