Startup Sound

Suggestions/requests/ideas for RuneAudio core features and functions

Startup Sound

Postby Plugs » 24 Dec 2014, 11:43

Could you pls add something Like a startup sound, because i often change the location of my sound system and with this i would directly know that its on
Plugs
 
Posts: 8
Joined: 17 Dec 2014, 22:42

Re: Startup Sound

Postby hondagx35 » 25 Dec 2014, 01:36

Hi Plugs,

i think this is something special and it's beyond the scope of RuneAudio.

You can easily add your own boot sound.

1. Place your audio file in /var/local/.
We will refer to the sound file as "/var/local/startupsound.wav".

2. Create /usr/bin/startupsound.sh, with these contents:
Code: Select all
#!/bin/sh
/usr/bin/aplay -D hw:0,0 '/var/local/startupsound.wav'

Change "hw:0,0" to your needs. You can list your sound devices with "aplay -l".

3. Make it executable:
Code: Select all
chmod +x /usr/bin/startupsound.sh

4. Make sure it plays the sound before performing the next steps.
Code: Select all
/usr/bin/startupsound.sh

5. Create /usr/lib/systemd/system/startupsound.service:
Code: Select all
[Unit]
Description=Startup Sound
After=alsa-restore.target

[Service]
Type=oneshot
ExecStart=/usr/bin/startupsound.sh

[Install]
WantedBy=multi-user.target

6. Reload the systemd service files:
Code: Select all
systemctl daemon-reload

7. Check that it is working:
Code: Select all
systemctl start startupsound

8. Enable the sound at boot:
Code: Select all
systemctl enable startupsound

9. Now reboot and enjoy!
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: Startup Sound

Postby Plugs » 26 Dec 2014, 12:41

Thx for your Nice Guide. But i get a error message.

error.png
error.png (189.56 KiB) Viewed 1658 times


is my wav sound wrong?
Plugs
 
Posts: 8
Joined: 17 Dec 2014, 22:42

Re: Startup Sound

Postby hondagx35 » 26 Dec 2014, 13:13

Hi,

There is nothing wrong with your soundfile.

Try to use plughw:x,0 instead of hw:x,0
Code: Select all
#!/bin/sh
/usr/bin/aplay -D plughw:x,0 '/var/local/startupsound.wav'


If your DAC supports all the formats you are playing then -D hw:x,0 works well, plughw:x,0 will add SRC capabilities so that unsupported sample rates will be converted to a working rate for your DAC.
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: Startup Sound

Postby Plugs » 26 Dec 2014, 14:41

This is what i get now.
Error2.png
Error2.png (194.89 KiB) Viewed 1648 times
Plugs
 
Posts: 8
Joined: 17 Dec 2014, 22:42

Re: Startup Sound

Postby ACX » 26 Dec 2014, 16:55

It would be simplier to convert that file to a newer. wav (or even .mp3) with the standard 16bit stereo at 44.1kHz format.
User avatar
ACX
RuneAudio co-founder
 
Posts: 1692
Joined: 29 Nov 2013, 02:25
Location: Udine, Italy

Re: Startup Sound

Postby Plugs » 26 Dec 2014, 17:33

Thats what i did now, and i was able to follow the rest of the instructions without further error messages, but it doesnt play the sound on startup.
Plugs
 
Posts: 8
Joined: 17 Dec 2014, 22:42

support RuneAudio Donate with PayPal


Return to Feature request

Who is online

Users browsing this forum: No registered users and 5 guests