[App] libPlaySound D/E/F/H

Here are software that related with Samsung F series TVs.
Post Reply

SamyGO Moderator
Posts: 7632
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

[App] libPlaySound D/E/F/H

Post by zoelechat » Wed May 25, 2016 9:42 pm

Useless? Maybe, but funny so indispensable :)
libPlaySound... plays sounds!

*For D series (arm), replace every instance of /mnt below by /mtd_rwcommon/widgets/user/SamyGO/SamyGO
  • First install latest samyGOso as usual, if needed.
  • Extract attached archives and copy libPlaySound.so and libTada.so to /mnt/opt/privateer/usr/libso (create folder if needed).
  • You noticed two libs are there, you first have to inject libTada resident (only once a boot of course), it installs necessary payloads other (non-resident) lib will use afterwards.

    Code: Select all

    samyGOso -T -B -r -l /mnt/opt/privateer/usr/libso/libTada.so
    At this point you should hear nothing yet.
  • Then you can play with sounds at will using other lib:

    Code: Select all

    samyGOso -T -B -l /mnt/opt/privateer/usr/libso/libPlaySound.so [arg1...argN]
  • Used without args, it will play a well-known "tada.wav". Usable args are:
    • WAVFILE:/full/path/to/yoursound.wav - Wave file to play. Default (unspecified) is built-in tada.wav
    • VOLUME:1-100 - Relative (to current) volume of wave to play. Default is VOLUME:100
    • STOP - Stops current playback in case you launched a (too) long wave file and you're bored. To be used as single arg.
  • Copy 99_94_Tada.init to /mnt/etc/init.d
  • Set permissions

    Code: Select all

    chmod +x /mnt/etc/init.d/99_94_Tada.init
  • Script injects only libTada, then it's up to you to use libPlaySound anywhere you want (e.g. Oscam started -> Tada! :p)
Wave file has to be standard PCM 16 bits (44 bytes header), mono or stereo, with sample rate of 22050Hz-48000Hz. I insist on "standard" since much waves found on the web don't respect it. Use any converter if needed (if it obviously doesn't sound as expected!)

You should be able to play waves *almost* as long as you want, but there's some theoretical limit due to sizeof(int) I didn't calculate. About more than half an hour I think...
Anyway, the point is primarily to play short "alerts" (ding dong pwêt). Please do not ask for MP3 nor playlist support and don't expect libJukebox :P


Code: Select all

* libPlaySound.so
v0.0.4 - First public release

Code: Select all

* libTada.so
v0.0.9 - First public release
You do not have the required permissions to view the files attached to this post.
I do NOT reply to any question by PM. Please use forum.

User avatar
SamyGO Project Donor
Posts: 364
Joined: Mon Nov 30, 2015 12:31 pm
Location: Slovakia

Re: [App] libPlaySound D/E/F/H

Post by notengo13 » Wed May 25, 2016 10:22 pm

Good job. :idea: . it works on my TV.

Now i can tell some things to my wife, through the tv. :lol:
UE48H6640 T-MST14DEUC 2781.0 root latestH --> 2130.0 skypeRoot-->0000-->2115.3 "Skype refueled" Root

SamyGO Project Donor
Posts: 3
Joined: Tue Jan 05, 2016 7:42 pm

Re: [App] libPlaySound D/E/F/H

Post by klepacky » Tue Feb 07, 2017 11:23 pm

Hello can anybody help me?

If i execute in putty:
/mnt # samyGOso -T -B -l /mnt/opt/privateer/usr/libso/libPlaySound.so WAVFILE:/m
it plays sound on tv immediately.

and if execute in putty - it write not found:
/mnt # /mnt/etc/init.d/03_02_Tada.init start
/mnt/etc/init.d/03_02_Tada.init: line 1: #!/bin/sh: not found
checking /dtv/usb/sda
samyGOso v1.2.4 (c) bugficks 2013, sectroyer 2014
Injecting '/mnt/opt/privateer/usr/libso/libTada.so' resident: '1'
/mnt/etc/init.d/03_02_Tada.init: line 33: WAVFILE:/mnt/opt/privateer/usr/sound/1.wav: not found

How to setup play sound on TV stratup?

03_02_Tada.init content:

Code: Select all

# © Copyright 1996-2016, zoelechat@SamyGO
. /dtv/SGO.env


	for USB in /dtv/usb/sd* ; do
		echo "checking $USB"
		[ -e $USB/STOP ] && echo "STOP found. Script exit..." && exit 1

case $1 in 
	samyGOso -T -B -r -l $SODIR/libTada.so
WAVFILE:/mnt/opt/privateer/usr/sound/1.wav ;;
	[ -f /dtv/Tada.log ] && cat /dtv/Tada.log || echo "Not started"
	echo "Usage: $0 {start|stop|status}" 1>&2
	exit 0

SamyGO Moderator
Posts: 7632
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: [App] libPlaySound D/E/F/H

Post by zoelechat » Tue Feb 07, 2017 11:26 pm

Typical error of Windows bad text editor. Use Notepad++ to edit scripts and set linefeeds to Unix format :)
I do NOT reply to any question by PM. Please use forum.

Post Reply

Return to “[F] Software”

Who is online

Users browsing this forum: No registered users and 2 guests