[input/xcode] Write to input buffer with the sources native sample rate/format

Still WIP at this point since the player and output can't use the use improved
quality yet, and because rtptimes etc. are likely incorrect
This commit is contained in:
ejurgensen
2019-01-11 19:34:36 +01:00
parent 84e813038b
commit 9182597605
8 changed files with 146 additions and 61 deletions

View File

@@ -215,7 +215,7 @@ playback(void *arg)
// Loops until input_loop_break is set or no more input, e.g. EOF
ret = inputs[type]->start(ps);
if (ret < 0)
input_write(NULL, INPUT_FLAG_ERROR);
input_write(NULL, 0, 0, INPUT_FLAG_ERROR);
#ifdef DEBUG
DPRINTF(E_DBG, L_PLAYER, "Playback loop stopped (break is %d, ret %d)\n", input_loop_break, ret);
@@ -240,7 +240,7 @@ input_wait(void)
// Called by input modules from within the playback loop
int
input_write(struct evbuffer *evbuf, short flags)
input_write(struct evbuffer *evbuf, int sample_rate, int bits_per_sample, short flags)
{
struct timespec ts;
int ret;