Question: How to use RecorderEx and PlayerEx in console application or Windows Service?

Answer: In order to use RecorderEx and PlayerEx in a console application or Windows Service need to create instances of these classes by using a parameterized constructor:
newRecorderEx(true) and
newPlayerEx(true), respectively. The same is true for multi-threaded recorder and player.

Question: I found that your vox converter doesn't handle vox files from the Orator phone dictation system right.

Answer: There are so many questions about Vox format. What is the Vox format? Vox audio file format is a headerless audio format data, which generally contains Dialogic_ADPCM, but may also include A-law, Mu-law, PCM, and any other type of audio data.
It means that vox file doesn't have the header and extention ".vox" doesn't say anything at all. Therefore it is very important to know in which format you have the audio data in the vox file!

DC offset is an offsetting of a signal from zero. It occurs when hardware, such as a sound card, adds DC offset to the recorded audio signal.
DC offset is shift of the red line comparatively to the black one on figure below.

To remove the DC offset is used AudioCompressionManager.RemoveDcOffset method. See code below

Question: Have you got any issues with "Joint-Stereo" MP3's?
I have a customer who sends me the attached MP3 and when I convert it to a mono format, it effectively cancels out the audio.

Answer: The problem is that in Mp3 Joint Stereo sound file mirror is opposite. For example the left channel = -1, and the right channel = +1.
When converting a file into single channels are merged: -1 + 1 = 0. So you hear the silence.
You can solve this problem in that way. Instead of combining the channels keep only one channel (left or right).

Very often we have to change the sampling rate, number of channels and the size of a sample when converting from one format to another. You can use AudioCompressionManager.Convert method for these purposes. Unfortunately, for the uncompressed PCM -> PCM this leads to a significant reduction in sound quality and appearance of extraneous noise. We can verify this by example.

Fortunately, Alvas.Audio library has AudioCompressionManager.Resample method. It is a wrapper over Resampler DMO object.
If we rewrite the code above using AudioCompressionManager.Resample method, we get much better sound quality.

RawReader class reads an audio data from the headerless stream. Slinear, Gsm, A-law, mu-law etc. For that, you need to specify explicitly the format of the audio data that they contain.

Mp3Reader class reads audio data from the Mp3 stream.

DsReader class reads audio data using DirectShow. List of supported formats can be expanded with additional DirectShow filters installed.
Use X Codec Pack
to expand the list of supported formats.
At the moment, can only work with files stored on disk.

Three methods of IAudioReader interface most commonly used.

string fileName = "Your audio file.wav";

IAudioReader ir = newWaveReader(File.OpenRead(fileName));

IntPtr format = ir.ReadFormat();// Reads an audio format.

byte[] data = ir.ReadData();// Reads all audio data from the stream.

ir.Close();// Closes the current reader and the underlying stream.

To read the audio data portions of 1 second, you can use the following code.

Audio file formats can be with a header, without header and with header in each packet of audio data.

Wav file is a classic audio format with a header. It is also called container format, because it may contain an audio data in a different format, which is specified in the header.

Headerless(Raw audio format) audio files can contain only audio data. Therefore, we must know exactly the format of the audio data. These files usually have .raw, .sln, .pcm, .alaw, .ulaw, .gsm and other file extensions.

MP3 format contains a header in each packet of audio data. Therefore, this format is suitable for broadcasting audio over the network.

ID3 (Identify a MP3) is metadata container most often used for MP3 audio files. ID3 signature contains information about the title track, album, artist name, etc. about the file to be stored in the file itself. Please see ID3.
Wave files can also store metadata similar ID3.

The code below shows how to add, delete, and read metadata from the Wav files.

Audio Compression Manager (ACM) is the Windows multimedia framework that manages audio codecs. Codec is a computer program that compresses/decompresses digital audio data according to a given audio file format or streaming audio format.
ACM driver is dynamic-link library (DLL) which contains audio codecs for different audio formats.
ACM drivers can be recognized by their filename extension ".acm". For more details please see Audio Compression Manager

The code below can be used to list ACM codecs installed on your computer and see audio formats for specified codec.

Question: I have multiple audio tracks with nothing but music.
I have multiple recorded voice tracks no longer than 2-3 seconds each.
What I would like to do is 'overlay' a voice track onto an audio
track at a specified time and output the results to a single file.
E.g. Audio track is 2 minutes long, and I would like to insert
the voice track at 23 seconds as well 1m 05 seconds and at 1m 40 seconds.
Can Alvas.Audio accomplish this sort of task for me??

Audio compression is a kind of data compression developed to reduce the transmission bandwidth of digital sound streams
and the size of audio files. Audio compression algorithms are applied in computer software as audio codecs. The compromise
between a little reduced sound quality and transmission or size is outweighed by the last for most practical audio apps in which
users may not feel the loss in playback rendition quality.

For instance, one compact disk (CD) contains about one hour of uncompressed (PCM) high quality music,
less than 2 hours of music compressed without loss in playback, or 7 hours of music compressed in the MP3 format at medium bit rates.

Lets analyse compressed audio format, for instance, "GSM 6.10". This format is applied to compress the mobile operators speaking on cellular.
GSM is applied for over 3 billion people in more than 212 countries and territories.

PCM (Pulse-code modulation) is an uncompressed audio format.
We get the Wav file, that maintains (holds) the PCM data.
See how to do What is a Wav-file?
Method AudioCompressionManager.GetWaveFormat helps investigate the audio format.

FormatTag = 1 is PCM.

Channels = for single-channel (mono), two-channel (stereo), 8 for 7.1 Surround Sound (left, right, center, left surround,
right surround, left rear, right rear positions. 7.1 systems also have 1 channel for low frequency effects (LFE) which is usually sent to a subwoofer).

BitsPerSample - most common uses 8 bits (1 byte) and 16 bits (2 bytes). Rarely 24 bits (3 bytes), 32 bits (4 bytes) and 64 bits (4 bytes).
If we consider the 16 bit as a basic, then 8 bits can be considered as a compressed format. It has two times less size,
but the variants of values can be only 28 = 256 instead of 216 = 65536 for 16 bits. That's why, 8 bits sound quality will be
significantly lower than 16 bits.

BlockAlign = Channels * BitsPerSample / 8. Where 8 is the quantity of bits per byte.

WAVE (WAV) is a container format for recording the digitized audio stream. Under Windows, this format is often
applied as a wrapper for uncompressed audio (PCM). But, you can put sound in WAV container compressed perhaps in any codec.

In that way your WAV-file can maintain data in various audio formats, such as the CCITT A-Law, CCITT u-Law, ADPCM, Speex, GSM 6.10, MPEG Layer-3 (mp3), Ogg Vorbis and others.

You can use the code below to investigate audio-format data recorded in your WAV-file.