Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Problem]: music does not play - only silence is played #1638

Closed
1 task done
peqoud opened this issue Feb 26, 2023 · 10 comments
Closed
1 task done

[Problem]: music does not play - only silence is played #1638

peqoud opened this issue Feb 26, 2023 · 10 comments

Comments

@peqoud
Copy link

peqoud commented Feb 26, 2023

What happened?

I have installed the latest version of shairport-sync an NQPTP

  • shairport-sync: 4.1-dev-875-gf164f19a-AirPlay2-alac-OpenSSL-Avahi-ALSA-pa-soxr-sysconfdir:/etc
  • NQPTP: Version: 1.1-dev-200-g5762735. Shared Memory Interface Version: 9.

Connecting works fine and I see the device. Though music never starts and it looks like only silence is played.
Checking the log files I see the following:

Line  1841:          0.005899544 "player.c:1266" Sent 8820 frames of silence
Line  1849:          0.000246913 "player.c:1266" Sent 199 frames of silence
Line  1857:          0.000178740 "player.c:1266" Sent 366 frames of silence
Line  1865:          0.000140387 "player.c:1266" Sent 43 frames of silence

This seems to stop with:

0.000028105 "player.c:2754" first frame sync error (positive --> late): 6 frames, 0.136 mS at 44100 frames per second output.

and then it seems like it would start, but still no sound input:
0.000088297 "player.c:2804" Connection 1: Playback started at frame 2994119244 -- AirPlay 2 Realtime.

Logfile attached: shairport-sync-log.txt

Not sure what else to check to get this right.
Next Step: collect a NQPTP log file

Relevant log output

No response

Configuration Information.

ace@debian:~/shairport-sync$ shairport-sync --displayConfig

Display Config Start.

From "uname -a":
Linux debian 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux

From /etc/os-release:
Debian GNU/Linux 11 (bullseye)

Shairport Sync Version String:
4.1-dev-875-gf164f19a-AirPlay2-alac-OpenSSL-Avahi-ALSA-pa-soxr-sysconfdir:/etc

Command Line:
shairport-sync --displayConfig

Configuration File:
/etc/shairport-sync.conf

The Configuration file contains no active settings.

Display Config End.
Goodbye!

How did you install Shairport Sync?

Built from source

Check previous issues

  • Confirm
@ghost
Copy link

ghost commented Feb 27, 2023

4.1-dev-875-gf164f19a is not the latest, 4.1-dev-877-g6d456573 is the latest

@peqoud
Copy link
Author

peqoud commented Feb 27, 2023

Right. Thanks for the Hint. I will check again with the newest commit in regular intervals.

@ghost
Copy link

ghost commented Feb 27, 2023

You can use #1566 to update and add git checkout development in update.sh

#!/bin/bash

# run script with root privileges

cd ~/ || exit

# Get Tools and Libraries
apt install --no-install-recommends build-essential git autoconf automake libtool \
    libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev \
    libplist-dev libsodium-dev libavutil-dev libavcodec-dev libavformat-dev uuid-dev libgcrypt-dev xxd

# Update NQPTP
if rm -f /lib/systemd/system/nqptp.service; then
    echo "Successfully deleted old NQPTP copy"
else
    echo "Could not delet old NQPTP copy" >&2
fi

rm -rf nqptp
git clone https://github.com/mikebrady/nqptp.git
cd nqptp || exit
git checkout development
autoreconf -fi
./configure --with-systemd-startup
make
make install

systemctl restart nqptp

# Build & Install Shairport Sync
cd || exit
rm -rf shairport-sync
git clone https://github.com/mikebrady/shairport-sync.git
cd shairport-sync || exit
git checkout development
autoreconf -fi
./configure --sysconfdir=/etc --with-alsa \
    --with-soxr --with-avahi --with-ssl=openssl --with-systemd --with-airplay-2
make
make install

if systemctl enable shairport-sync; then
    echo "Shairport Sync successfully updated and running"
else
    echo "Failed to updated Shairport Sync " >&2
fi

echo "Rebooting"
reboot

@mikebrady
Copy link
Owner

Thanks for the report. First, if you have the development branch of Shairport Sync, you need the development version of NQPTP. Assuming that’s all sorted out, let me suggest that you stop the Shairport Sync service and run it from the command line to figure out what’s happening. To stop the service:

$ sudo systemctl stop shairport-sync

Then you can run it from the command line with:

$ shairport-sync -v --statistics

You’ll get some diagnostics and stats on that window. You could use alsamixer in a separate window to raise and lower the volume of the output device.

Perhaps you could post the output of the shairport-sync process and listen carefully for any audio output?

@peqoud
Copy link
Author

peqoud commented Feb 28, 2023

I am already on the development branch.
Sound works fine with other apps. There is just no input from the shaireport-player to the mixer.

Today I can create more logs.
The log above has been created with -vvv

@mikebrady
Copy link
Owner

Thanks. When you are generating the logs, a verbosity of 1 or 2 is fine — 3 is too much!

@peqoud
Copy link
Author

peqoud commented Mar 2, 2023

New Log file with the following versions:

  • Shairport Sync Version String: 4.1-dev-875-gf164f19a-AirPlay2-alac-OpenSSL-Avahi-ALSA-pa-soxr-sysconfdir:/etc
  • Version: 1.1-dev-200-g5762735. Shared Memory Interface Version: 9.

Shairport Log File: shairport-log.txt

What I see in the Mixer:
Screenshot_2023-03-01_22-49-26

I assume the bottom bar in the ALSA plugin-in [shairport-sync] would show the input level to be played. It always stays at this level like shown in the screenshot

@mikebrady
Copy link
Owner

Thanks for the information. Your logs also suggest that the audio is being received and processed by Shairport Sync, which is good news.

The input level shown in the Volume Control panel is not affected by the AirPlay volume (i.e. the volume setting on your iOS/macOS source) setting. Instead, the AirPlay volume sets the level of the audio going in to the ALSA plug in. By default, it will be at -24.00 on a -30.00 to 0.00 dB (?) scale. My suggestion is to ensure the AirPlay volume is up high.

It's working fine for me right here, running from the command line, on a Debian 11 VM in a macOS host:

image

@peqoud
Copy link
Author

peqoud commented Mar 2, 2023

Ok, embarrassing as it is, it seems like that what I really needed was to set the AirPlay volume very close to the maximum.
I really thought I had done this before openning up this issue/discussion.

Closing this and thanks for your time. A great tool you created!

@peqoud peqoud closed this as completed Mar 2, 2023
@mikebrady
Copy link
Owner

Super, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants