Can this oggplay cli program be compiled... (not needed!)

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
pakt
Posts: 1157
Joined: Sat 04 Jun 2005, 16:54
Location: Sweden

Can this oggplay cli program be compiled... (not needed!)

#1 Post by pakt »

I'm considering what applications we should have in a special version of Puppy for low-powered machines like the MicroClientJr. Some apps like Gxine are just too resource hungry to be included.

However, I noticed that Puppy uses Gxine to play .ogg files. For other formats we have simple cli apps like 'madplay' (.mp3), 'wavplay' (.wav) and 'aplay' (.au) (even if I can't get that to work on the MCjr).

So I looked around on the net and found this cli program 'oggplay.c': http://mirrors.techiesabode.com/linuxga ... huveb.html
It uses the libvorbisfile library which Puppy already has.

Could this program be compiled to work in Puppy?
Paul
Last edited by pakt on Fri 24 Nov 2006, 18:15, edited 1 time in total.
Methinks Raspberry Pi were ideal for runnin' Puppy Linux

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#2 Post by GuestToo »


User avatar
pakt
Posts: 1157
Joined: Sat 04 Jun 2005, 16:54
Location: Sweden

#3 Post by pakt »

That's a winner, G2!

I'm playing the Shadows 'Wonderful_land.ogg' on the MCjr right now with the earphone jack connected to my stereo - WOW! :P

Thanks for providing this little jewel!
Paul
Methinks Raspberry Pi were ideal for runnin' Puppy Linux

Braden
Posts: 69
Joined: Fri 22 Sep 2006, 20:39
Location: Waterloo, Ontario, Canada

#4 Post by Braden »

Just the record, the answer to your original question is yes; it compiled on my relatively-stock (only added OpenSSH and Zlib) 2.12 install.

The command is

Code: Select all

gcc oggplay.c -oggplay -lvorbisfile -I/usr/include/vorbis -L/usr/lib

User avatar
pakt
Posts: 1157
Joined: Sat 04 Jun 2005, 16:54
Location: Sweden

#5 Post by pakt »

Thanks for that Braden. Just out of curiosity, how big was the binary?
The ogg123 binary is 24228 bytes.

Paul
Methinks Raspberry Pi were ideal for runnin' Puppy Linux

Braden
Posts: 69
Joined: Fri 22 Sep 2006, 20:39
Location: Waterloo, Ontario, Canada

#6 Post by Braden »

It's 8407 bytes.

Considerably smaller, but I don't think even Puppy will notice a 16KB difference.

I imagine that's how bloat starts though: a few dozen people say "Ah, no one will care about 15 megs" and now the product is 3GB instead of 800MB.

User avatar
pakt
Posts: 1157
Joined: Sat 04 Jun 2005, 16:54
Location: Sweden

#7 Post by pakt »

Yes, size does count... :shock:

Braden, would you mind posting your binary? I would like to see (uh, hear) how well it works ;)
Methinks Raspberry Pi were ideal for runnin' Puppy Linux

Braden
Posts: 69
Joined: Fri 22 Sep 2006, 20:39
Location: Waterloo, Ontario, Canada

#8 Post by Braden »

Okay, here you go.
I actually don't have sound (SSH'd in from work, slow day) so I haven't tested it :oops:
Attachments
oggplay.tar.gz
The binary for oggplay; built for 2.12.
(3.61 KiB) Downloaded 238 times

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#9 Post by GuestToo »

to be fair, ogg123 is a powerful progam included in the vorbis tools package and written by the ogg guys at Xiph (there should be a vorbis tools dotpup or pupget package somewhere, maybe by plinej ... if there isn't there should be) ... ogg123 can be used not just to play ogg files, but to convert ogg files to wav's, au's etc etc ... so ogg123 is a much more powerful program than the example programs on that web page, which are really intended to be simple examples of how to program in C

ps. Puppy already comes with mpg123 installed

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#10 Post by Dougal »

GuestToo wrote:ps. Puppy already comes with mpg123 installed
Not the last time I checked (2.10)...
It has mpg123 as a link to gxine.

I asked Barry to add it ages ago (around 1.08) and he said he will, but it must have been forgotten.

I think the Vorbis-Tools package could be good to have in Puppy too (many dotpups require parts of it), but that's up to Barry and space limitations...
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

User avatar
pakt
Posts: 1157
Joined: Sat 04 Jun 2005, 16:54
Location: Sweden

#11 Post by pakt »

Braden, thanks for providing the oggplay binary.

I've tested it now and it works, but in slowmotion and with a lot of distortion which I think is due to it outputing text while it plays. This is what I mean:

Code: Select all

# ./oggplay /mnt/sda1/wonderful_land.ogg 
title=Wonderful Land
artist=The Shadows
genre=Other
date=2004
album=Classic Hits

Bitstream is 2 channel, 44100Hz

Decoded length: 6048756 samples
Encoded by: Xiph.Org libVorbis I 20040629

Writing 2304 bytes for the 1 time.
Writing 4096 bytes for the 2 time.
Writing 4096 bytes for the 3 time.
Writing 4096 bytes for the 4 time.
Writing 4096 bytes for the 5 time.
Writing 4096 bytes for the 6 time.
Writing 4096 bytes for the 7 time.
<--snip-->
I think it may be useful to get this working as minimum-resource alternative to ogg123.
Paul
Methinks Raspberry Pi were ideal for runnin' Puppy Linux

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#12 Post by GuestToo »

last time I checked (2.10)...
It has mpg123 as a link to gxine
you are right, in Puppy 212 mpg123 is just a symlink to gxine ... i just noticed that it existed, i didn't notice it was just a symlink

pakt, i think that particular ogg player is extremely limited, and would not be particularly useful unless it were heavily heavily modified ... i think it would be better to write a completely new program and not bother to try to base the new program on that one ... i think that program was intended to be just a simple example of how to write a C program, i don't think it was intended to be a practical and useful ogg player

ogg123 is a powerful and useful program, written by the people who created ogg ... i doubt if you could find a better program ... you might find a smaller program, but at 28k, maybe there wouldn't be much point ... but you might find another program that has different functions, and might be more suitable for your purposes

User avatar
pakt
Posts: 1157
Joined: Sat 04 Jun 2005, 16:54
Location: Sweden

#13 Post by pakt »

Point taken, G2. As you said, ogg123 has a lot of functions in spite of its small size. :)
Methinks Raspberry Pi were ideal for runnin' Puppy Linux

Post Reply