softsyst / qirx_issues

Issue tracker for QIRX
1 stars 1 forks source link

Muted icon but audio is playing (after loss of sync) #158

Open andimik opened 2 months ago

andimik commented 2 months ago

Described in https://www.rundfunkforum.de/viewtopic.php?p=1772782#p1772782

Although the main reason might be a loss of sync Qirx shall not play audio when it is muted.

The icon still remains the same (no sound icon), BTW.

softsyst commented 2 months ago

Please describe your problem here in this thread, as for readability of the thread it is much more useful to have the problem description here, and not having to read first in another forum. In addition, not every user reading here understands German.

Thanks.

andimik commented 2 months ago

Einen schönen guten Abend Clem,

in such a case, Qirx will forget that MUTE has been pressed before and will play audio.

Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001

listening on port 1234...
listening on port 1235...
client accepted!
control client accepted!
request all serials
Preparing device serials list.
select serial
Device 0 with CRC ecbf40c9 selected.
FIR Filter 2400 kHz
Found Rafael Micro R820T tuner
Sampling at 2048000 S/s.
Tuned to 100000000 Hz.
Tuner gain set to automatic.
Set agc mode 1
Bandwidth set to automatic resulted in 2000000 Hz.
tuner_gain_count = 16
set bias tee 0
unsupported cmd 0x84
unsupported cmd 0x84
set sample rate 2048000
disable dithering
set tuner bandwidth to 2030000 Hz
Bandwidth parameter 2030000 Hz resulted in 2000000 Hz.
set gain mode 1
set agc mode 0
set bias tee 0
unsupported cmd 0x90
set freq 183648000
set freq correction to 0.000 ppm
read registers 1
set gain mode 1
set agc mode 0
set freq 183648000
set freq correction to 0.000 ppm
set gain mode 1
set agc mode 0
set tuner gain by index 4294967295
set tuner gain by index 0
set freq 183648000
set tuner bandwidth to 2030000 Hz
Bandwidth parameter 2030000 Hz resulted in 2000000 Hz.
rtlsdr_demod_write_reg failed with -1
rtlsdr_demod_write_reg failed with -1
r82xx_read: i2c rd failed=-1 len=5
rtlsdr_demod_write_reg failed with -1
rtlsdr_demod_write_reg failed with -1
r82xx_read: i2c rd failed=-1 len=5
QIRX AAC stream player V2.2
Copyright (c) Clem Schmidt, 2019-2021, qirx.softsyst.com

libfaad2 is Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com

NAudio is an open source .NET audio library written by Mark Heath (mark.heath@gmail.com)
For more information, visit http://github.com/naudio/NAudio
PortAudio Portable Real-Time Audio Library, Copyright (c) 1999-2011 Ross Bencina and Phil Burk
PortAudio P/Invoke interfacing based on work by Atsushi Eno, https://github.com/atsushieno/portaudio-sharp

 The following UDP Addresses and ports are used:
        AAC Streams:    Remote endpoint:         127.0.0.1:8766
        AAC Streams:    Own endpoint:            127.0.0.1:8767
        Commands:       Remote endpoint:         127.0.0.1:8768
        Commands:       Own endpoint:            127.0.0.1:8769

        Import Resolver for assembly qirx_audio, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null created.

UDP connected to: 127.0.0.1:8766
UDPCmd connected to: 127.0.0.1:8768
Stream Receive thread entered.
Command thread entered.
Waiting for command...

Mode MODE_AAC set. New connection requested.
AAC Decoder closed
AAC Decoder opened
Waiting for command...
Waiting for command...
Initialized for AAC with BUFFER_AAC_ASC mode
Sample rate = 48000

Mode MODE_AAC set. New connection requested.
AAC Decoder closed
AAC Decoder opened
Initialized for AAC with BUFFER_AAC_ASC mode
Sample rate = 48000
Waiting for command...
Audio Mute off
Waiting for command...

Mode MODE_AAC set. New connection requested.
AAC Decoder closed
AAC Decoder opened
Waiting for command...

Mode MODE_AAC set. New connection requested.
AAC Decoder closed
AAC Decoder opened
Waiting for command...
Audio Mute off
Waiting for command...
Audio Mute off
Waiting for command...
Initialized for AAC with BUFFER_AAC_ASC mode
Sample rate = 48000
Audio Mute on
Waiting for command...

Mode MODE_AAC set. New connection requested.
AAC Decoder closed
AAC Decoder opened
Waiting for command...
Audio Mute off
Waiting for command...
Initialized for AAC with BUFFER_AAC_ASC mode
Sample rate = 48000

Mode MODE_AAC set. New connection requested.
AAC Decoder closed
AAC Decoder opened
Waiting for command...
Audio Mute off
Waiting for command...

Mode MODE_AAC set. New connection requested.
AAC Decoder closed
AAC Decoder opened
Waiting for command...
Audio Mute off
Waiting for command...

Mode MODE_AAC set. New connection requested.
AAC Decoder closed
AAC Decoder opened
Waiting for command...
Audio Mute off
Waiting for command...

Mode MODE_AAC set. New connection requested.
AAC Decoder closed
AAC Decoder opened
Waiting for command...
Audio Mute off
Waiting for command...

Mode MODE_AAC set. New connection requested.
AAC Decoder closed
AAC Decoder opened
Waiting for command...
Audio Mute off
Waiting for command...
Initialized for AAC with BUFFER_AAC_ASC mode
Sample rate = 48000
Audio Mute on
Waiting for command...

Mode MODE_AAC set. New connection requested.
AAC Decoder closed
AAC Decoder opened
Waiting for command...
Audio Mute off
Waiting for command...

Mode MODE_AAC set. New connection requested.
AAC Decoder closed
AAC Decoder opened
Waiting for command...
Initialized for AAC with BUFFER_AAC_ASC mode
Sample rate = 48000
Audio Mute off
Waiting for command...

Mode MODE_AAC set. New connection requested.
AAC Decoder closed
AAC Decoder opened
Waiting for command...
Initialized for AAC with BUFFER_AAC_ASC mode
Sample rate = 48000
Audio Mute on
Waiting for command...

Mode MODE_AAC set. New connection requested.
AAC Decoder closed
AAC Decoder opened
Waiting for command...
Initialized for AAC with BUFFER_AAC_ASC mode
Sample rate = 48000

I can reproduce it.

Sometimes the icon stays on mute on like in the screenshot, please have a look at the audio mixer.

grafik

When I press the mute icon (from mute to not mute), it will still play the audio, and the output will change to

Audio Mute off
andimik commented 2 months ago

You could try this:

a) mute a station b) change FFT lenght to a very high value c) sync loss d) audio plays

softsyst commented 2 months ago

Andreas,

Here on my machine, I am not able to reproduce the behavior you are describing. I do not get a sync loss on selecting a high FFT length. However, a sync loss is easily forced if the gain is reduced or (as I do it here) on a RSP when a high LNA state is selected, which is essentially the same. Here, when muted, after re-sync after a sync loss the mute icon is off, the audio plays.

This is the intended behavior. In this way you can easily check that an unsync happened, without the necessity to stay at the receiver. Just let it play and mute. If you leave it this way, as soon as the audio starts playing you know that a sync loss had happened. This was particularly useful when the rtl_tcp.exe lost samples. Only after @old-dab's research on this, his rtlsdr was stable enough for long-time playing of DAB without losing samples. The RSPs never had this problem.

So, if that was your problem, all works as intended.

Clem

andimik commented 2 months ago

Here, when muted, after re-sync after a sync loss the mute icon is off, the audio plays.

I'm glad you could reproduce it.