Add support for MixRamp tags
Adds mixrampdb and mixrampdelay commands. Reads MIXRAP_START and MIXRAMP_END tags from FLAC files and overlaps instead of crossfading.
This commit is contained in:
committed by
Max Kellermann
parent
e9b75d462c
commit
e7a515c8b1
@@ -30,6 +30,7 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
|
||||
struct player_control pc;
|
||||
|
||||
@@ -45,6 +46,8 @@ void pc_init(unsigned buffer_chunks, unsigned int buffered_before_play)
|
||||
pc.error = PLAYER_ERROR_NOERROR;
|
||||
pc.state = PLAYER_STATE_STOP;
|
||||
pc.cross_fade_seconds = 0;
|
||||
pc.mixramp_db = 0;
|
||||
pc.mixramp_delay_seconds = nanf("");
|
||||
}
|
||||
|
||||
void pc_deinit(void)
|
||||
@@ -305,6 +308,34 @@ pc_set_cross_fade(float cross_fade_seconds)
|
||||
idle_add(IDLE_OPTIONS);
|
||||
}
|
||||
|
||||
float
|
||||
pc_get_mixramp_db(void)
|
||||
{
|
||||
return pc.mixramp_db;
|
||||
}
|
||||
|
||||
void
|
||||
pc_set_mixramp_db(float mixramp_db)
|
||||
{
|
||||
pc.mixramp_db = mixramp_db;
|
||||
|
||||
idle_add(IDLE_OPTIONS);
|
||||
}
|
||||
|
||||
float
|
||||
pc_get_mixramp_delay(void)
|
||||
{
|
||||
return pc.mixramp_delay_seconds;
|
||||
}
|
||||
|
||||
void
|
||||
pc_set_mixramp_delay(float mixramp_delay_seconds)
|
||||
{
|
||||
pc.mixramp_delay_seconds = mixramp_delay_seconds;
|
||||
|
||||
idle_add(IDLE_OPTIONS);
|
||||
}
|
||||
|
||||
double
|
||||
pc_get_total_play_time(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user