| Author |
Message |
disciple
Joined: 20 May 2006 Posts: 6179 Location: Auckland, New Zealand
|
Posted: Fri 03 Sep 2010, 02:01 Post subject:
|
|
| Quote: | | Impact not discernible with htop (in cache?) |
That's why I didn't try to compare it myself
_________________ DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
|
|
Back to top
|
|
 |
jpeps
Joined: 31 May 2008 Posts: 2421
|
Posted: Fri 03 Sep 2010, 06:52 Post subject:
|
|
| disciple wrote: | | Quote: | | Impact not discernible with htop (in cache?) |
That's why I didn't try to compare it myself  |
Hey.. there's a difference; this is for the high quality mini using gnu libc and libm.
mpg321: 55M 6% CPU
minimp3: 48M 2% CPU
|
|
Back to top
|
|
 |
goingnuts
Joined: 07 Dec 2008 Posts: 626
|
Posted: Sun 05 Sep 2010, 09:07 Post subject:
|
|
Any chance to include support for .au and .wav-play? Think both can just be send to /dev/audio or /dev/dsp via cat but might not play all files correct though...
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Sun 05 Sep 2010, 15:16 Post subject:
|
|
| goingnuts wrote: | | Any chance to include support for .au and .wav-play? Think both can just be send to /dev/audio or /dev/dsp via cat but might not play all files correct though... |
I can't code it but if you can point me to a small standalone example(s), I may be able to hack it in there. I'd also need a C example to parse the file extension.
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Tue 07 Sep 2010, 01:04 Post subject:
|
|
I found wavplay, but it needs a lot of hacking down - still contains quite some bloat, but I compiled it statically against dietlibc if anyone wants it.
http://sourceforge.net/projects/wavplay/files/
edit: bplay is a little better size wise and plays other formats too
| Description |
|

Download |
| Filename |
bplay.tar.gz |
| Filesize |
30.22 KB |
| Downloaded |
269 Time(s) |
| Description |
|

Download |
| Filename |
wavplay.tar.gz |
| Filesize |
18.86 KB |
| Downloaded |
286 Time(s) |
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
goingnuts
Joined: 07 Dec 2008 Posts: 626
|
Posted: Sat 25 Sep 2010, 10:48 Post subject:
|
|
Thanks for the new small players! Tried to compile your modified minimp3 using ulibc - seems to work ok - but size is huge 44K.
| Description |
minimp3-ulib_static 44K
|

Download |
| Filename |
minimp3-ulib_static.tar.gz |
| Filesize |
25.59 KB |
| Downloaded |
244 Time(s) |
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Sat 25 Sep 2010, 12:22 Post subject:
|
|
it only adds about 20kb to busybox if you compile statically against static uclibc (using CFLAGS="-ffunction-sections -fdata-sections ...:" and LDFLAGS="-Wl,...,--gc-sections,... ")
I submitted the patch to the busybox mail list and Denys Vlasenko sent me some tips for shrinking the size even further. I will post the tarball with the patch and notes from Denys. So far I haven't been able to do much more than the formatting without breaking the build.
| Description |
extract in your busybox source root and run: patch -p0 <....patch
|

Download |
| Filename |
minimp3-busybox-patch.tar.gz |
| Filesize |
24.73 KB |
| Downloaded |
248 Time(s) |
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
jpeps
Joined: 31 May 2008 Posts: 2421
|
Posted: Sat 25 Sep 2010, 13:51 Post subject:
|
|
Where is busybox source stored? Thanks
edit: I guess I could just download 1.16.2 from icewalkers.
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Sat 25 Sep 2010, 16:00 Post subject:
|
|
it was diffed against the latest stable shortly after its release:
http://busybox.net/downloads/busybox-1.17.2.tar.bz2
Ffor continuity it is best to try applying against master:
http://git.busybox.net/busybox/snapshot/busybox-master.tar.bz2
or at least the latest snapshot:
http://busybox.net/downloads/snapshots/busybox-snapshot.tar.bz2
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
goingnuts
Joined: 07 Dec 2008 Posts: 626
|
Posted: Fri 12 Nov 2010, 01:42 Post subject:
|
|
| technosaurus wrote: | | ...it but if you can point me to a small standalone example(s), I may be able to hack it in there. I'd also need a C example to parse the file extension. |
Attached small application that find file extension and launch minimp3, wavplay or play .au directly. Could be done by script...
bplay have some code that determines file-extension but I do not understand how - else bplay merged with minimp3 could be a more complete player (if size still could be small).
Update: Refined (...?) the code, added multi player capabilities - just through all your audio files to the launcher and they will play. Also included a much smaller static binary compiled using diet-lib (9K). Do not use spaces in filename - working on this bug...
Still not very useful compared to a simple script...but fun to sniff to C-coding...
Another (last) update: Now works with file-names containing spaces.
| Description |
Updated (3vers.) example program written in C to determine file extension and launch wavplay, minimp3 or play .au-files directly
|

Download |
| Filename |
launcher_example_C.tar.gz |
| Filesize |
7.97 KB |
| Downloaded |
222 Time(s) |
Last edited by goingnuts on Sat 13 Nov 2010, 05:15; edited 3 times in total
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Fri 12 Nov 2010, 03:23 Post subject:
|
|
I forgot these functions that I have added to bashbox:
(doesn't work for _ALL_ files though)
| Code: | play_au() { #just sends $@ to /dev/audio
cat $@ > /dev/audio
}
play_wav() { #just sends $@ to /dev/dsp
cat $@ > /dev/dsp
} |
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
Ibidem
Joined: 25 May 2010 Posts: 245
|
Posted: Sun 15 Apr 2012, 21:44 Post subject:
Test w/musl libc... |
|
Yes I know this thread is old--but I thought I'd rather not steal the pupngo thread.
Here's the sizes when built with musl libc and stripped:
| Code: | -rwxr-xr-x 1 ibid ibid 46028 2012-04-15 18:28 minimp3-musl
-rwxr-xr-x 1 ibid ibid 33724 2012-04-15 18:28 minimp3-musl,os
-rwxr-xr-x 1 ibid ibid 42944 2012-04-15 18:28 minimp3-musl,s
-rwxr-xr-x 1 ibid ibid 29288 2012-04-15 18:28 minimp3-musl.upx |
musl,os : built with -Os
musl,s: built with -static -Os
musl: unoptimized, dynamically linked
musl.upx: musl,s after upx --best
All of them sound decent (close to mpg123)
RSS ~1MB, CPU 4%.
(Built on Ubuntu Lucid)
|
|
Back to top
|
|
 |
goingnuts
Joined: 07 Dec 2008 Posts: 626
|
Posted: Mon 16 Apr 2012, 15:02 Post subject:
|
|
Attached slightly modified source - accept command -q for silent run (like mpg123). Build static with diet libc:
| Code: | | -rwxr-xr-x 1 root root 40084 2012-04-16 20:59 minimp3 |
Build static with uclibc:
| Code: | | -rwxr-xr-x 1 root root 47116 2012-04-16 21:04 minimp3 |
| Description |
modified to accept command line -q for silent run
|

Download |
| Filename |
minimp3_source_mod.tar.gz |
| Filesize |
34.09 KB |
| Downloaded |
119 Time(s) |
|
|
Back to top
|
|
 |
Ibidem
Joined: 25 May 2010 Posts: 245
|
Posted: Mon 16 Apr 2012, 20:26 Post subject:
|
|
| Code: |
musl-gcc -pipe -Os -mtune=i686 -static -s -ffunction-sections -fdata-sections -D_XOPEN_SOURCE -Wl,--gc-sections -finline-functions-called-once -fmerge-all-constants -fexpensive-optimizations -fomit-frame-pointer -fpeephole2 -fno-loop-optimize -momit-leaf-frame-pointer minimp3.c |
gives 40736 bytes; stripped is 40588 bytes
49183 bytes built with -Os -static -D_XOPEN_SOURCE and unstripped, so that's a tiny bit larger than uclibc.
|
|
Back to top
|
|
 |
goingnuts
Joined: 07 Dec 2008 Posts: 626
|
Posted: Tue 17 Apr 2012, 11:21 Post subject:
|
|
Ibidem: Thats a small difference in size - I think I will start looking more close on the musl!
The mpg123 seems to compile easy with diet (a small diff and build script attached). It gives a 212K static bin. Wonder at what size musl will do that?
Tried to use the latest mpg123 ("mpg123-1.13.8") - it compiled but did have issues playing mp3. Then went for mpg123-1.13.4 which also compiles and on top of that actually plays mp3.
Also did a quick test with mpg321 but that seems harder to patch for diet libc.
While surfing I found this page with some nice instructions for streaming mp3 and a poor mans skype...
Might be that the minimp3 could also be hacked to play URL playlists? The mpg123 can play internet radio by issuing the following command:
| Code: | | mpg123 -@ http://players.creacast.com/creacast/classique/playlist.pls |
| Description |
patch and buildscript for diet libc compiled mpg123
|

Download |
| Filename |
mpg123-1.13.4_diet_build_tools.tar.gz |
| Filesize |
653 Bytes |
| Downloaded |
115 Time(s) |
|
|
Back to top
|
|
 |
|