I want to play an audio file(.mp3) in audacity,
through c++ command.
Actually I want to write a c++ code which will open audacity and play the audio file.
So,how to write a command to open that file and play?
September 5, 2013, 2:07pm
You could build Audacity from the source code and enable mod-script-pipe (
http://manual.audacityteam.org/o/man/scripting.html), but it would probably be easier to use a command line player such as SoX ( http://sox.sourceforge.net/) rather than Audacity.
Thank you steve,
In audacity link, it’s about perl scripting,
but is it possible to implement through c++?
I mean, is it possible to play an audio file in audacity,
by sending c++ command and it will open audacity and play the audio file,
which we want?
September 6, 2013, 10:17am
I’m not a C++ programmer. It’s been a few years since I’ve played with this but I’ve had mod-script-pipe working with Python and with BASH. I’d imagine that C++ also supports pipes.
Thank you steve.
In audacity, is there any api for play command?
September 9, 2013, 9:59am
It’s rather complex because Audacity is not a “file player”.
Audacity projects are made up of “blocks” of data that are managed by an XML structure. For cross-platform support Audacity uses PortAudio to handle audio I/O http://www.portaudio.com/
“Play” commands are handled through src/toolbars/ControlToolBar.cpp (see ControlToolBar::OnPlay)