Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions po/ca.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: overwitch 1.1\n"
"Report-Msgid-Bugs-To: dagargo@gmail.com\n"
"POT-Creation-Date: 2025-08-19 12:36+0200\n"
"POT-Creation-Date: 2025-12-06 10:11+0100\n"
"PO-Revision-Date: 2022-09-21 19:08+0200\n"
"Last-Translator: David García Goñi <dagargo@gmail.com>\n"
"Language-Team: Catalan\n"
Expand All @@ -17,25 +17,25 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: src/main.c:153
#: src/main.c:168
msgid "Stop All Devices"
msgstr "Para tots el dispositius"

#: src/main.c:154
#: src/main.c:169
msgid "Start All Devices"
msgstr "Arranca tots el dispositius"

#: src/main.c:165
#: src/main.c:180
#, c-format
msgid "JACK at %.5g kHz, %u period"
msgstr "JACK a %.5g kHz, període de %u"

#: src/main.c:169
#: src/main.c:184
#, c-format
msgid "Target latency: %.1f ms"
msgstr "Latència objectiu: %.1f ms"

#: src/main.c:439
#: src/main.c:454
msgid "Acknowledgements"
msgstr "Agraïments"

Expand Down Expand Up @@ -63,6 +63,10 @@ msgstr "Ajustant"
msgid "Running"
msgstr "Executant"

#: src/message.c:146
msgid "Retuning"
msgstr "Reajustant"

#: res/overwitch.ui:11
msgid "Show All Columns"
msgstr "Mostra totes les columnes"
Expand Down
16 changes: 10 additions & 6 deletions po/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: overwitch 1.1\n"
"Report-Msgid-Bugs-To: dagargo@gmail.com\n"
"POT-Creation-Date: 2025-08-19 12:36+0200\n"
"POT-Creation-Date: 2025-12-06 10:11+0100\n"
"PO-Revision-Date: 2022-09-21 19:03+0200\n"
"Last-Translator: David García Goñi <dagargo@gmail.com>\n"
"Language-Team: English\n"
Expand All @@ -17,25 +17,25 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: src/main.c:153
#: src/main.c:168
msgid "Stop All Devices"
msgstr ""

#: src/main.c:154
#: src/main.c:169
msgid "Start All Devices"
msgstr ""

#: src/main.c:165
#: src/main.c:180
#, c-format
msgid "JACK at %.5g kHz, %u period"
msgstr ""

#: src/main.c:169
#: src/main.c:184
#, c-format
msgid "Target latency: %.1f ms"
msgstr ""

#: src/main.c:439
#: src/main.c:454
msgid "Acknowledgements"
msgstr ""

Expand Down Expand Up @@ -63,6 +63,10 @@ msgstr ""
msgid "Running"
msgstr ""

#: src/message.c:146
msgid "Retuning"
msgstr ""

#: res/overwitch.ui:11
msgid "Show All Columns"
msgstr ""
Expand Down
16 changes: 10 additions & 6 deletions po/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: overwitch 1.1\n"
"Report-Msgid-Bugs-To: dagargo@gmail.com\n"
"POT-Creation-Date: 2025-08-19 12:36+0200\n"
"POT-Creation-Date: 2025-12-06 10:11+0100\n"
"PO-Revision-Date: 2022-09-21 19:06+0200\n"
"Last-Translator: David García Goñi <dagargo@gmail.com>\n"
"Language-Team: Spanish\n"
Expand All @@ -17,25 +17,25 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: src/main.c:153
#: src/main.c:168
msgid "Stop All Devices"
msgstr "Parar todos los dispositivos"

#: src/main.c:154
#: src/main.c:169
msgid "Start All Devices"
msgstr "Arrancar todos los dispositivos"

#: src/main.c:165
#: src/main.c:180
#, c-format
msgid "JACK at %.5g kHz, %u period"
msgstr "JACK a %.5g kHz, periodo de %u"

#: src/main.c:169
#: src/main.c:184
#, c-format
msgid "Target latency: %.1f ms"
msgstr "Latencia objetivo: %.1f ms"

#: src/main.c:439
#: src/main.c:454
msgid "Acknowledgements"
msgstr "Agradecimientos"

Expand Down Expand Up @@ -63,6 +63,10 @@ msgstr "Ajustando"
msgid "Running"
msgstr "Ejecutando"

#: src/message.c:146
msgid "Retuning"
msgstr "Reajustando"

#: res/overwitch.ui:11
msgid "Show All Columns"
msgstr "Mostrar todas las columnas"
Expand Down
18 changes: 11 additions & 7 deletions po/overwitch.pot
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: overwitch 2.1\n"
"Project-Id-Version: overwitch 2.1.1\n"
"Report-Msgid-Bugs-To: dagargo@gmail.com\n"
"POT-Creation-Date: 2025-08-19 12:36+0200\n"
"POT-Creation-Date: 2025-12-06 10:11+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand All @@ -17,25 +17,25 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: src/main.c:153
#: src/main.c:168
msgid "Stop All Devices"
msgstr ""

#: src/main.c:154
#: src/main.c:169
msgid "Start All Devices"
msgstr ""

#: src/main.c:165
#: src/main.c:180
#, c-format
msgid "JACK at %.5g kHz, %u period"
msgstr ""

#: src/main.c:169
#: src/main.c:184
#, c-format
msgid "Target latency: %.1f ms"
msgstr ""

#: src/main.c:439
#: src/main.c:454
msgid "Acknowledgements"
msgstr ""

Expand Down Expand Up @@ -63,6 +63,10 @@ msgstr ""
msgid "Running"
msgstr ""

#: src/message.c:146
msgid "Retuning"
msgstr ""

#: res/overwitch.ui:11
msgid "Show All Columns"
msgstr ""
Expand Down
2 changes: 1 addition & 1 deletion res/overwitch.ui
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</section>
</menu>
<object class="GtkAdjustment" id="blocks_adjustment">
<property name="lower">8.0</property>
<property name="lower">6.0</property>
<property name="page-increment">4</property>
<property name="step-increment">1</property>
<property name="upper">24</property>
Expand Down
2 changes: 1 addition & 1 deletion src/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#define OW_XFR_TIMEOUT_MIN 0
#define OW_XFR_TIMEOUT_MAX 25

#define OW_BLOCKS_MIN 8
#define OW_BLOCKS_MIN 6
#define OW_BLOCKS_MAX 32

void
Expand Down
44 changes: 32 additions & 12 deletions src/dll.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#define UINT64_USEC_TO_DOUBLE_SEC(t) (SEC_PER_USEC * (int)(t & 0x0FFFFFFF))
#define MODTIME_THRESHOLD 200 //A value smaller than the maximum returned by UINT64_USEC_TO_DOUBLE_SEC

#define MAX_RATIO_ERROR 2

double
wrap_time (double d, double q)
{
Expand All @@ -50,7 +52,7 @@ ow_dll_overbridge_init (void *data, double samplerate, uint32_t frames)
struct ow_dll *dll = data;
struct ow_dll_overbridge *dll_ob = &dll->dll_overbridge;

debug_print (2,
debug_print (3,
"Initializing Overbridge side of DLL (%.1f Hz, %d frames)...",
samplerate, frames);

Expand All @@ -68,13 +70,13 @@ ow_dll_overbridge_update (void *data, uint32_t frames, uint64_t t)
struct ow_dll *dll = data;
struct ow_dll_overbridge *dll_ob = &dll->dll_overbridge;

debug_print (4, "Updating Overbridge side of DLL...");
debug_print (5, "Updating Overbridge side of DLL...");

time = UINT64_USEC_TO_DOUBLE_SEC (t);

if (dll_ob->boot)
{
debug_print (3, "Booting Overbridge side of DLL...");
debug_print (4, "Booting Overbridge side of DLL...");
dll_ob->i0.time = time;
dll_ob->i1.time = dll_ob->i0.time + dll_ob->dt;

Expand All @@ -97,7 +99,7 @@ ow_dll_overbridge_update (void *data, uint32_t frames, uint64_t t)
dll_ob->i0.frames = dll_ob->i1.frames;
dll_ob->i1.frames += frames;

debug_print (4, "time: %3.6f; t0: %3.6f: t1: %3.6f; f0: % 8d; f1: % 8d",
debug_print (5, "time: %3.6f; t0: %3.6f: t1: %3.6f; f0: % 8d; f1: % 8d",
time, dll_ob->i0.time, dll_ob->i1.time, dll_ob->i0.frames,
dll_ob->i1.frames);
}
Expand All @@ -110,7 +112,7 @@ ow_dll_host_update_error (struct ow_dll *dll, uint64_t t)
int32_t delta_frames_exp, delta_frames_act;
double time = UINT64_USEC_TO_DOUBLE_SEC (t);

debug_print (4, "Updating error in host side of DLL (time %lu)...", t);
debug_print (5, "Updating error in host side of DLL (time %lu)...", t);

delta_frames_exp = dll->i1.frames - dll->i0.frames;
dn = wrap_time (time - dll->i0.time, dll->t_quantum);
Expand All @@ -121,36 +123,52 @@ ow_dll_host_update_error (struct ow_dll *dll, uint64_t t)

if (dll->boot)
{
debug_print (3, "Booting host side of DLL...");
debug_print (4, "Booting host side of DLL...");
int n = (int) (floor (dll->err + 0.5));
dll->frames += n;
dll->err -= n;
dll->boot = 0;
}

debug_print (4,
debug_print (5,
"delta_frames_exp: %d; delta_frames_act: %d; delta_overbridge: %f; DLL target delay: %d; DLL error: %f",
delta_frames_exp, delta_frames_act, delta_overbridge,
dll->target_delay, dll->err);
}

inline void
inline int
ow_dll_host_update (struct ow_dll *dll)
{
debug_print (4, "Updating host side of DLL...");
int err = 0;

debug_print (5, "Updating host side of DLL...");

dll->z1 += dll->w0 * (dll->w1 * dll->err - dll->z1);
dll->z2 += dll->w0 * (dll->z1 - dll->z2);
dll->z3 += dll->w2 * dll->z2;
dll->ratio = 1.0 - dll->z2 - dll->z3;
if (dll->ratio > dll->max_ratio)
{
error_print ("Using DLL max ratio instead of %f", dll->ratio);
err = 1;
dll->ratio = dll->max_ratio;
}
else if (dll->ratio < dll->min_ratio)
{
error_print ("Using DLL min ratio instead of %f", dll->ratio);
dll->ratio = dll->min_ratio;
err = 1;
}

debug_print (5, "DLL ratio: %f", dll->ratio);

debug_print (4, "DLL ratio: %f", dll->ratio);
return err;
}

inline void
ow_dll_host_init (struct ow_dll *dll)
{
debug_print (2, "Initializing host side of DLL...");
debug_print (3, "Initializing host side of DLL...");
dll->boot = 1;
dll->t_quantum = ldexp (1e-6, 28); //28 bits as used in UINT64_USEC_TO_DOUBLE_SEC
dll->dll_overbridge.boot = 1;
Expand All @@ -161,13 +179,15 @@ ow_dll_host_reset (struct ow_dll *dll, double output_samplerate,
double input_samplerate, uint32_t output_frames,
uint32_t input_frames)
{
debug_print (2, "Resetting the DLL...");
debug_print (3, "Resetting the DLL...");

dll->z1 = 0.0;
dll->z2 = 0.0;
dll->z3 = 0.0;

dll->ratio = output_samplerate / input_samplerate;
dll->max_ratio = dll->ratio * MAX_RATIO_ERROR;
dll->min_ratio = dll->ratio / MAX_RATIO_ERROR;

dll->frames = -input_frames / dll->ratio;

Expand Down
4 changes: 3 additions & 1 deletion src/dll.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ struct ow_dll_overbridge
struct ow_dll
{
double ratio;
double max_ratio;
double min_ratio;
uint32_t frames;
double w0;
double w1;
Expand Down Expand Up @@ -69,7 +71,7 @@ void ow_dll_host_set_loop_filter (struct ow_dll *, double, uint32_t, double);

void ow_dll_host_update_error (struct ow_dll *dll, uint64_t time);

void ow_dll_host_update (struct ow_dll *dll);
int ow_dll_host_update (struct ow_dll *dll);

void ow_dll_host_load_dll_overbridge (struct ow_dll *dll);

Expand Down
Loading