AutoHotkey Community

It is currently May 27th, 2012, 12:15 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: soundplay and ogg vorbis
PostPosted: August 21st, 2005, 8:55 am 
Offline

Joined: February 16th, 2005, 5:32 pm
Posts: 44
Having some strange problems with mp3 and soundplay (see this thread: mp3 glitch) I want to try ogg files. But how do I do this? The remark on soundplay in the help file reads
Quote:
All Windows OSes should be able to play .wav files. However, other files (.mp3, .avi, etc.) might not be playable if the right codecs or features aren't installed on the OS.

That sounds like "get the right codec -> soundplay will play anything"... So I installed an ogg codec but soundplay will still not play ogg files (%errorlevel% = 1). So either I am missing something or it is not the right codec (How do I test a codec, btw?)? What should I do then? Or will soundplay never play ogg files?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 21st, 2005, 12:21 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
I think the ogg codec would have to be an ACM codec (one that appears in the control panel section described in the post you linked above).

If this is already the case, I'm not sure what could be wrong.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 21st, 2005, 6:30 pm 
[Might be of interest]
---------
USAGE:
postfish [options] infile [infile]+ [-g infile [infile]+]+ > output

OPTIONS:
-c --configuration-file : load state from alternate configuration file
-g --group : place following input files in a new channel
grouping
-h --help : print this help

INPUT:
Postfish takes WAV/AIFF input either from stdin or from a list of files
specified on the command line. A list of input files is handled as
time-continguous entries, each holding audio data that continues at
the instant the previous file ends. Files may also be arranged into
groups with -g; each group represents additional input channels
parallel to preceeding groups. All input files must be the same
sampling rate. Files in a group must have the same number of
channels.


Examples:
Files a.wav, b.wav, c.wav and d.wav are all four channels and
ten minutes each.

postfish a.wav b.wav c.wav d.wav
This command line treats the input as forty minutes of four channel
audio in the order a.wav, b.wav, c.wav, d.wav.

postfish a.wav b.wav -g c.wav d.wav
This command line treats the input as twenty minutes of eight channel
audio. Channels 1-4 are taken from files a.wav and b.wav while channels
5-8 are taken from files c.wav and d.wav.

cat a.wav | postfish
This command line sends a.wav to Postfish as a non-seekable stream
of four-channel data. If the WAV (or AIFF) header is complete, Postfish
obeys the length encoded in the header and halts after processing to
that length. If the data length in the header is unset (0 or -1),
Postfish will continue processing data until EOF on stdin.

OUTPUT:
Postfish writes output to stdout.

If stdout is piped, the output is nonseekable and Postfish marks the
produced header incomplete (length of -1). Stopping and re-starting
processing writes a fresh stream to stdout.

If stdout is redirected to a file, Postfish will write a complete header
upon processing halt or program exit. If processing halts and restarts,
the file is re-written from scratch.

If stdout is a pipe or redirected to a file, the user may specify
parallel audio monitor through the audio device using the 'mOn' activator
button in the main panel's 'master' section, or on the output config
panel. The audio device selected for playback is configurable on the
output config panel.

If stdout is redirected to an audio device, output is sent to that audio
device exclusively and the 'mOn' activator on the main panel will not
be available.

* Postfish is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 21st, 2005, 10:46 pm 
Offline

Joined: February 16th, 2005, 5:32 pm
Posts: 44
@Chris:
Hm, yes, it is an ACM codec which appears exactly where the my MP3 codecs resist but still it does not work. I have nothing against learning something new but if nothing works that's sure demotivating. :?

Well, for ogg files I get an errorlevel of 1 as written above... does this give any hint on where the error might be? I mean, suppose it would just be a bad codec which does whatever but not playing ogg files... would the errorlevel then still be 1? I thought the errorlevel would rather be 1 if you have a file not found error or something "fundamental"? (/edit: ...and that others (like "speakers turned off" :wink: ) would remain unnoticed by AHK)

Another question: What use can one have for an ogg codec on a "pure" windows system? I mean, Winamp has it build in (well, actually plugged in :) ) ogg plug-in, CDEx uses the LAME MP3 encoder without the LAME codec installed... So no need here for a codec? But if I install an ogg codec, should the the WMP be able to play ogg files? Or: Is there a way I can test the codec other than Autohotkey?

Lot's of questions, I know... I'll glady take any links shedding light on those things. :)



@BoBo:
Hey, thanks. Looks good on the first glance. I will risk a second one tomorrow. :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 21st, 2005, 11:47 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
SoundPlay sets ErrorLevel to 1 whenever mciSendString() indicates a failure. Try the revised DllCall method at the topic mp3 glitch. That should allow you more control over what happens, though you may have to do a little more research at MSDN to interpret any error codes or errors messages that come back.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 24th, 2005, 4:20 pm 
Offline

Joined: February 16th, 2005, 5:32 pm
Posts: 44
As I wrote in the mp3glitch thread linked above: disabling mp3 codecs does not stop soundplay from playing mp3s. Considering this it seems not very plausible that enabling ogg codecs will make it play ogg files. So right now I've run out of ideas.

(This is just a final message to more or less close the thread. I hate it when I use the search function and find a thread that seems to has been forgotten and has no end. :lol: )


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Apollo, Leef_me, Pulover, rjgatito, XstatyK, Yahoo [Bot] and 20 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group