Basic audio is a class library with a test project (audio player/recorder) to faciliate basic audio playing and recording. There are other frameworks available to give you very detailed and complex audio functionality, this one aims to provide only
the basic playback / record methods. That being the case, the goal is to keep it simple for those that just want to incorporate playback/recording with minimal code or learning other frameworks.
Basic audio was written in Visual Basic against the .Net Framework 3.5 and has been tested against Windows Vista SP1. The class itself handles recording and playback via the mciSendString Windows API. The playback features support wave files and mp3 files and
the recoding supports wave files. The class library contains 3 classes, one for playback, one for recording and one that is an MCI error messages (there's an official API for this that I'll use in the future). The classes have been kept slim to facilitate
ease of use. If you're looking for very detailed recording objects you'll want to consider another framework but for basic recording tasks this works very well. Note that it records through whatever the currently selected play back device is in windows.
The examples are in Vb, I'll include the C# syntax next week.
Basic Start Recording Example
' There are properties on this object to change the quality recording
Dim AudioRecorder As New Argus.Audio.Recording()
AudioRecorder.Filename = "c:\test.wav"
Basic Stop Recording Example
' File is written out to disk when this is called. The filename property must already be set.
Basic Playback Example
Dim AudioPlayer As New Argus.Audio.AudioFile()
AudioPlayer.Filename = "c:\test.mp3"
AudioPlayer.Play() ' Pause and Stop methods available
Test Application Screenshot
This is a screen shot of the test application. This test application just shows how to use some of the functionality. There maybe slight UI glitches in this as I threw it together fairly quickly. It's mainly just a quick start to show you how to use this
application. The test application is included with the source code. The release only includes the binary.