[App] libPlaySound D/E/F/H

Here are software that related with Samsung F series TVs.
Please don't create any new topic here unless you have software to post/release.
Post Reply

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

[App] libPlaySound D/E/F/H

Post by zoelechat »

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

Usage:
*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.
Autostart:
  • 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

*Changelog:

Code: Select all

* libPlaySound.so
25/5/2016
v0.0.4 - First public release

Code: Select all

* libTada.so
25/5/2016
v0.0.9 - First public release
You do not have the required permissions to view the files attached to this post.
I do NOT receive any PM. Please use forum.
User avatar
notengo13
SamyGO Project Donor
Posts: 674
Joined: Mon Nov 30, 2015 12:31 pm
Location: SK --> P9

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

Post by notengo13 »

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
QE55QN93A - - >firmware T-NKM2DEUC-1805.4 (backup 1590.0) - - >update CURL60 Error --> CURL28 Error
klepacky
SamyGO Project Donor
Posts: 4
Joined: Tue Jan 05, 2016 7:42 pm

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

Post by klepacky »

Hello can anybody help me?

If i execute in putty:
/mnt # samyGOso -T -B -l /mnt/opt/privateer/usr/libso/libPlaySound.so WAVFILE:/m
nt/opt/privateer/usr/sound/1.wav
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'
Succeeded.
/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

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

SODIR=$SYSROOT/opt/privateer/usr/libso

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

case $1 in 
	start)
	stop_bootloop
	[ "$LIBSO_DIR" ] && SODIR=$LIBSO_DIR
	samyGOso -T -B -r -l $SODIR/libTada.so
WAVFILE:/mnt/opt/privateer/usr/sound/1.wav ;;
	stop)
	;;
	status)
	[ -f /dtv/Tada.log ] && cat /dtv/Tada.log || echo "Not started"
	;;
	*)
	echo "Usage: $0 {start|stop|status}" 1>&2
	exit 0
	;;
esac
zoelechat
SamyGO Moderator
Posts: 8615
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

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

Post by zoelechat »

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

Post Reply

Return to “[F] Software”