LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 05-15-2007, 09:07 AM   #1
Valkyrie_of_valhalla
Member
 
Registered: Jan 2006
Location: Romania
Distribution: Suse 12.0, Slackware 12.1, Debian, Ubuntu, Gentoo
Posts: 301

Rep: Reputation: 30
Does anybody know a command line wav player that doesn't display anything?


I'm searching for a command line wav player to use it with a program I'm writing (a nice little guitar tuner/ear trainer). It's supposed to run under windows/DOS ( I know, but the program is for a school project).
I want it to play a wav file, without displaying anything.

I tried mplayer, but it shows various info about the computer and the played file, even with the very quiet option. I also tried discarding the output to NUL:, which is an equivalent to Linux's /dev/null from what I get it, but it doesn't seem to work with a 16bit Pascal-written program...

Thought about modifying mplayer's source code for this, or maybe just extracting the functions related to playing wav files, but I have to go through about 2700 files and search...

So, does anyone know of such a program? Other ideas/suggestions are welcomed as well.
 
Old 05-15-2007, 09:26 AM   #2
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Manjaro
Posts: 963

Rep: Reputation: 36
read the rules,

we dont help with homework!
 
Old 05-15-2007, 09:49 AM   #3
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
Doesn't look like homework to me.

xmms2
 
Old 05-15-2007, 09:58 AM   #4
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Manjaro
Posts: 963

Rep: Reputation: 36
Quote:
Originally Posted by Valkyrie_of_valhalla
( I know, but the program is for a school project).
<snip>
looks like homework to me
 
Old 05-15-2007, 11:27 AM   #5
Dragineez
Member
 
Registered: Oct 2005
Location: Annapolis
Distribution: Ubuntu
Posts: 278

Rep: Reputation: 41
Api

What you're looking for is the playsound API. Look for the winmm.dll resources to see how to invoke in your programming language du jour.
 
Old 05-15-2007, 12:42 PM   #6
Valkyrie_of_valhalla
Member
 
Registered: Jan 2006
Location: Romania
Distribution: Suse 12.0, Slackware 12.1, Debian, Ubuntu, Gentoo
Posts: 301

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by rickh
Doesn't look like homework to me.

xmms2
Thanks, I should have thought of trying xmms, I never new they had a windows console version...

Quote:
Originally Posted by Dragineez
What you're looking for is the playsound API. Look for the winmm.dll resources to see how to invoke in your programming language du jour.
Thank you too, I'll see what I can find out about it. It should be a good option as well, and would greatly reduce the size of the program.

Quote:
Originally Posted by dasy2k1
read the rules,

we dont help with homework!
Well, the LQ Rules state that I am not allowed to ask you to do my homework, and I am not asking you that. My "homework" consists in actually writing the program, which I shall do myself (actually I already wrote about 70% of it). Simply asking for an external program, for which I have previously googled and searched on sourceforge for hours, in my oppinion doesn't qualify as asking you to do my homework. If I didn't understand the rule right, then please correct me.
 
Old 05-15-2007, 03:44 PM   #7
cormack
Member
 
Registered: Oct 2005
Location: Scotland, UK
Distribution: Kubuntu 9.10, ubuntu 8.04.2 server
Posts: 156

Rep: Reputation: 30
so if he took out ( I know, but the program is for a school project), and just left it that he needed it on windows everyone would come and help him?
 
Old 05-15-2007, 07:03 PM   #8
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Stop being a troll dasy2k1.

Unless his homework is "Find a console audio player with no display output" then his question is perfectly fine.
 
Old 05-15-2007, 09:26 PM   #9
St.Jimmy
Member
 
Registered: Jun 2006
Location: Boaz,Alabama
Distribution: Ubuntu 10.10 / Windows 7 Pro 64-Bit / Snow Leopard 10.6.4 64-Bit
Posts: 152

Rep: Reputation: 30
Ohh, Will you release it on sf?
 
Old 05-16-2007, 12:55 AM   #10
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
My 2 cents -- the OP is simply asking for suggestions for an app that runs silently in CLI. Doesn't look like homework to me, given the context of the question.

Perhaps something like cdtool might be of interest, although I haven't used this personally so don't really know what it does/doesn't do.
 
Old 05-16-2007, 01:11 AM   #11
alred
Member
 
Registered: Mar 2005
Location: singapore
Distribution: puppy and Ubuntu and ... erh ... redhat(sort of) :( ... + the venerable bsd and solaris ^_^
Posts: 658
Blog Entries: 8

Rep: Reputation: 31
or he can also try madplay and/or play for other things ...


//.2 cents ...


.
 
Old 05-16-2007, 02:45 AM   #12
PatrickMay16
Member
 
Registered: Apr 2005
Location: London, England.
Distribution: Debian oldstable
Posts: 56

Rep: Reputation: 53
Did you try sox?
 
Old 05-16-2007, 09:43 AM   #13
Dragineez
Member
 
Registered: Oct 2005
Location: Annapolis
Distribution: Ubuntu
Posts: 278

Rep: Reputation: 41
Do It The Easy Way

Since you're obligated to do it in Windows and your program appears to be shellexec'ing an external program with parameters (the WAV you want to play), why not do it the easy way - PlaySound.vbs.
Code:
If WScript.Arguments.Count <> 1 Then
	Wscript.Echo "Usage: CScript.exe PlaySound.vbs <inputFile>"
 	WScript.Quit 
End If 

PlaySound WScript.Arguments(0)

'-----------------------------------------------------
' Purpose:  To play a sound requested by the user.
'-----------------------------------------------------
Sub PlaySound(TheSound)

Set objWMP = CreateObject("wmplayer.ocx.7")
objWMP.url = TheSound
objWMP.Controls.play
WScript.Sleep 1000
objWMP.close
Set objWMP = nothing

end Sub
Have your program invoke:
Code:
cscript [Path]PlaySound.vbs "FullyQualifiedPathToTheWavFile"
You may want to play around with the "Sleep" time. Must be long enough to prevent the object from being destroyed before the wav finishes playing, but should be short enough so you don't have too much silence between wavs you want to play. Could mod the script to take sleep duration as another parameter.

I dunno, not elegant - but it works.

Last edited by Dragineez; 05-16-2007 at 09:47 AM.
 
Old 05-16-2007, 01:20 PM   #14
alred
Member
 
Registered: Mar 2005
Location: singapore
Distribution: puppy and Ubuntu and ... erh ... redhat(sort of) :( ... + the venerable bsd and solaris ^_^
Posts: 658
Blog Entries: 8

Rep: Reputation: 31
this is what i found recently ... looks like vb stuffs for me but plays monkeys audio(probably related to wave audio ?? i donno ) ...

http://www.vbaccelerator.com/home/VB...MAC_Sample.asp



//just for reference if it helps ...


.
 
Old 05-16-2007, 03:23 PM   #15
Valkyrie_of_valhalla
Member
 
Registered: Jan 2006
Location: Romania
Distribution: Suse 12.0, Slackware 12.1, Debian, Ubuntu, Gentoo
Posts: 301

Original Poster
Rep: Reputation: 30
Thank you all for your suggestions. I'll check everything out and post what worked best.

Quote:
Originally Posted by St.Jimmy
Ohh, Will you release it on sf?
I thought about it, and also about making a Linux version. When I chose this project, it was because I could't find a good tuner on Linux for an acoustic guitar.
But I don't know if anyone would really like to use a 16 bit program written in Pascal with crappy graphics. I'll probably rewrite it in C this summer, making it somewhat better, and then post it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Command line utility to conver wav to aiff and vice versa hakmed Linux - Software 1 03-25-2006 04:09 PM
edit wav files via command line in a script legolin Linux - Software 4 12-21-2005 10:09 AM
Command line MP3 player? Kanon Linux - Newbie 8 01-19-2005 10:34 AM
What is the best command-line MP3 player? fatman Linux - Software 4 03-17-2004 04:18 PM
Command to display whole filestructure hierarchy f/ command line? mjewell Linux - Newbie 10 01-19-2004 10:48 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 04:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration