NAudio Helper class turning an already 32 bit floating point IWaveProvider into an ISampleProvider - hopefully not needed for most applications Helper base class for classes converting to ISampleProvider Like IWaveProvider, but makes it much simpler to put together a 32 bit floating point mixing engine Fill the specified buffer with 32 bit floating point samples The buffer to fill with samples. Offset into buffer The number of samples to read the number of samples written to the buffer. Gets the WaveFormat of this Sample Provider. The wave format. Source Wave Provider Source buffer (to avoid constantly creating small buffers during playback) Initialises a new instance of SampleProviderConverterBase Source Wave provider Reads samples from the source wave provider Sample buffer Offset into sample buffer Number of samples required Number of samples read Ensure the source buffer exists and is big enough Bytes required Wave format of this wave provider Initializes a new instance of the WaveToSampleProvider class Source wave provider, must be IEEE float Reads from this provider Simple SampleProvider that passes through audio unchanged and raises an event every n samples with the maximum sample value from the period for metering purposes Initialises a new instance of MeteringSampleProvider that raises 10 stream volume events per second Source sample provider Initialises a new instance of MeteringSampleProvider source sampler provider Number of samples between notifications Reads samples from this Sample Provider Sample buffer Offset into sample buffer Number of samples required Number of samples read Number of Samples per notification Raised periodically to inform the user of the max volume The WaveFormat of this sample provider Event args for aggregated stream volume Max sample values array (one for each channel) The WMA wave format. May not be much use because WMA codec is a DirectShow DMO not an ACM Represents a Wave file format format type number of channels sample rate for buffer estimation block size of data number of bits per sample of mono data number of following bytes Creates a new PCM 44.1Khz stereo 16 bit format Creates a new 16 bit wave format with the specified sample rate and channel count Sample Rate Number of channels Gets the size of a wave buffer equivalent to the latency in milliseconds. The milliseconds. Creates a WaveFormat with custom members The encoding Sample Rate Number of channels Average Bytes Per Second Block Align Bits Per Sample Creates an A-law wave format Sample Rate Number of Channels Wave Format Creates a Mu-law wave format Sample Rate Number of Channels Wave Format Creates a new PCM format with the specified sample rate, bit depth and channels Creates a new 32 bit IEEE floating point wave format sample rate number of channels Helper function to retrieve a WaveFormat structure from a pointer WaveFormat structure Helper function to marshal WaveFormat to an IntPtr WaveFormat IntPtr to WaveFormat structure (needs to be freed by callee) Reads in a WaveFormat (with extra data) from a fmt chunk (chunk identifier and length should already have been read) Binary reader Format chunk length A WaveFormatExtraData Reads a new WaveFormat object from a stream A binary reader that wraps the stream Reports this WaveFormat as a string String describing the wave format Compares with another WaveFormat object Object to compare to True if the objects are the same Provides a Hashcode for this WaveFormat A hashcode Writes this WaveFormat object to a stream the output stream Returns the encoding type used Returns the number of channels (1=mono,2=stereo etc) Returns the sample rate (samples per second) Returns the average number of bytes used per second Returns the block alignment Returns the number of bits per sample (usually 16 or 32, sometimes 24 or 8) Can be 0 for some codecs Returns the number of extra bytes used by this waveformat. Often 0, except for compressed formats which store extra data after the WAVEFORMATEX header Sample provider interface to make WaveChannel32 extensible Still a bit ugly, hence internal at the moment - and might even make these into bit depth converting WaveProviders Helper function to avoid creating a new buffer every read ACM_DRIVERENUMF_NOLOCAL, Only global drivers should be included in the enumeration ACM_DRIVERENUMF_DISABLED, Disabled ACM drivers should be included in the enumeration Interop structure for ACM driver details (ACMDRIVERDETAILS) http://msdn.microsoft.com/en-us/library/dd742889%28VS.85%29.aspx ACMDRIVERDETAILS_SHORTNAME_CHARS ACMDRIVERDETAILS_LONGNAME_CHARS ACMDRIVERDETAILS_COPYRIGHT_CHARS ACMDRIVERDETAILS_LICENSING_CHARS ACMDRIVERDETAILS_FEATURES_CHARS DWORD cbStruct FOURCC fccType FOURCC fccComp WORD wMid; WORD wPid DWORD vdwACM DWORD vdwDriver DWORD fdwSupport; DWORD cFormatTags DWORD cFilterTags HICON hicon TCHAR szShortName[ACMDRIVERDETAILS_SHORTNAME_CHARS]; TCHAR szLongName[ACMDRIVERDETAILS_LONGNAME_CHARS]; TCHAR szCopyright[ACMDRIVERDETAILS_COPYRIGHT_CHARS]; TCHAR szLicensing[ACMDRIVERDETAILS_LICENSING_CHARS]; TCHAR szFeatures[ACMDRIVERDETAILS_FEATURES_CHARS]; Property Store class, only supports reading properties at the moment. Contains property guid Looks for a specific Guid True if found Gets property key at sepecified index Index Property key Gets property value at specified index Index Property value Creates a new property store IPropertyStore COM interface Property Count Gets property by index Property index The property Indexer by guid Property guid Property or null if not found A thread-safe Progress Log Control Creates a new progress log control Report progress from a progress event Log a message Clear the log Required designer variable. Clean up any resources being used. true if managed resources should be disposed; otherwise, false. Required method for Designer support - do not modify the contents of this method with the code editor. The contents of the log as text Represents a MIDI Channel AfterTouch Event. Represents an individual MIDI event The MIDI command code Creates a MidiEvent from a raw message received using the MME MIDI In APIs The short MIDI message A new MIDI Event Constructs a MidiEvent from a BinaryStream The binary stream of MIDI data The previous MIDI event (pass null for first event) A new MidiEvent Converts this MIDI event to a short message (32 bit integer) that can be sent by the Windows MIDI out short message APIs Cannot be implemented for all MIDI messages A short message Default constructor Creates a MIDI event with specified parameters Absolute time of this event MIDI channel number MIDI command code Whether this is a note off event Whether this is a note on event Determines if this is an end track event Displays a summary of the MIDI event A string containing a brief description of this MIDI event Utility function that can read a variable length integer from a binary stream The binary stream The integer read Writes a variable length integer to a binary stream Binary stream The value to write Exports this MIDI event's data Overriden in derived classes, but they should call this version Absolute time used to calculate delta. Is updated ready for the next delta calculation Stream to write to The MIDI Channel Number for this event (1-16) The Delta time for this event The absolute time for this event The command code for this event Creates a new ChannelAfterTouchEvent from raw MIDI data A binary reader Creates a new Channel After-Touch Event Absolute time Channel After-touch pressure Calls base class export first, then exports the data specific to this event MidiEvent.Export The aftertouch pressure value Windows Forms control for painting audio waveforms Required designer variable. Clean up any resources being used. true if managed resources should be disposed; otherwise, false. Required method for Designer support - do not modify the contents of this method with the code editor. Constructs a new instance of the WaveFormPainter class On Resize On ForeColor Changed Add Max Value On Paint A trackview clip Creates a new trackview clip Clip Name Foreground Colour Background Colour Start Time Duration End Time Summary description for Fader. Required designer variable. Creates a new Fader control Clean up any resources being used. Required method for Designer support - do not modify the contents of this method with the code editor. Minimum value of this fader Maximum value of this fader Current value of this fader Fader orientation Represents a SoundFont Loads a SoundFont from a file Filename of the SoundFont The File Info Chunk The Presets The Instruments The Sample Headers The Sample Data Instrument Builder base class for structures that can read themselves Channel Mode Stereo Joint Stereo Dual Channel Mono H(s) = 1 / (s^2 + s/Q + 1) H(s) = s^2 / (s^2 + s/Q + 1) H(s) = s / (s^2 + s/Q + 1) (constant skirt gain, peak gain = Q) H(s) = (s/Q) / (s^2 + s/Q + 1) (constant 0 dB peak gain) H(s) = (s^2 + 1) / (s^2 + s/Q + 1) H(s) = (s^2 - s/Q + 1) / (s^2 + s/Q + 1) H(s) = (s^2 + s*(A/Q) + 1) / (s^2 + s/(A*Q) + 1) H(s) = A * (s^2 + (sqrt(A)/Q)*s + A)/(A*s^2 + (sqrt(A)/Q)*s + 1) a "shelf slope" parameter (for shelving EQ only). When S = 1, the shelf slope is as steep as it can be and remain monotonically increasing or decreasing gain with frequency. The shelf slope, in dB/octave, remains proportional to S for all other values for a fixed f0/Fs and dBgain. Gain in decibels H(s) = A * (A*s^2 + (sqrt(A)/Q)*s + 1)/(s^2 + (sqrt(A)/Q)*s + A) Contains the name and CLSID of a DirectX Media Object Initializes a new instance of DmoDescriptor Name Clsid Audio Endpoint Volume Volume Range Minimum Decibels Maximum Decibels Increment Decibels Audio Endpoint Volume Channels Channel Count Indexer - get a specific channel Audio Capture Client Gets a pointer to the buffer Pointer to the buffer Gets a pointer to the buffer Number of frames to read Buffer flags Pointer to the buffer Gets the size of the next packet Release buffer Number of frames written Release the COM object A buffer of Wave samples for streaming to a Wave Output device creates a new wavebuffer WaveOut device to write to Buffer size in bytes Stream to provide more data Lock to protect WaveOut API's from being called on >1 thread Finalizer for this wave buffer Releases resources held by this WaveBuffer Releases resources held by this WaveBuffer this is called by the WAVE callback and should be used to refill the buffer Whether the header's in queue flag is set The buffer size in bytes Utility class to intercept audio from an IWaveProvider and save it to disk Generic interface for all WaveProviders. Fill the specified buffer with wave data. The buffer to fill of wave data. Offset into buffer The number of bytes to read the number of bytes written to the buffer. Gets the WaveFormat of this WaveProvider. The wave format. Constructs a new WaveRecorder The location to write the WAV file to The Source Wave Provider Read simply returns what the source returns, but writes to disk along the way Closes the WAV file The WaveFormat Converts from mono to stereo, allowing freedom to route all, some, or none of the incoming signal to left or right channels Creates a new stereo waveprovider based on a mono input Mono 16 bit PCM input Reads bytes from this WaveProvider 1.0 to copy the mono stream to the left channel without adjusting volume 1.0 to copy the mono stream to the right channel without adjusting volume Output Wave Format This class writes WAV data to a .wav file on disk Creates a Wave file by reading all the data from a WaveProvider BEWARE: the WaveProvider MUST return 0 from its Read method when it is finished, or the Wave File will grow indefinitely. The filename to use The source WaveProvider WaveFileWriter that actually writes to a stream Stream to be written to Wave format to use Creates a new WaveFileWriter The filename to write to The Wave Format of the output data Read is not supported for a WaveFileWriter Seek is not supported for a WaveFileWriter SetLength is not supported for WaveFileWriter Appends bytes to the WaveFile (assumes they are already in the correct format) the buffer containing the wave data the offset from which to start writing the number of bytes to write Appends bytes to the WaveFile (assumes they are already in the correct format) the buffer containing the wave data the offset from which to start writing the number of bytes to write Writes a single sample to the Wave file the sample to write (assumed floating point with 1.0f as max value) Writes 32 bit floating point samples to the Wave file They will be converted to the appropriate bit depth depending on the WaveFormat of the WAV file The buffer containing the floating point samples The offset from which to start writing The number of floating point samples to write Writes 16 bit samples to the Wave file The buffer containing the 16 bit samples The offset from which to start writing The number of 16 bit samples to write Writes 16 bit samples to the Wave file The buffer containing the 16 bit samples The offset from which to start writing The number of 16 bit samples to write Ensures data is written to disk Actually performs the close,making sure the header contains the correct data True if called from Dispose Updates the header with file size information Finaliser - should only be called if the user forgot to close this WaveFileWriter The wave file name or null if not applicable Number of bytes of audio in the data chunk WaveFormat of this wave file Returns false: Cannot read from a WaveFileWriter Returns true: Can write to a WaveFileWriter Returns false: Cannot seek within a WaveFileWriter Gets the Position in the WaveFile (i.e. number of bytes written so far) MP3 WaveFormat, MPEGLAYER3WAVEFORMAT from mmreg.h Wave format ID (wID) Padding flags (fdwFlags) Block Size (nBlockSize) Frames per block (nFramesPerBlock) Codec Delay (nCodecDelay) Creates a new MP3 WaveFormat Wave Format Padding Flags MPEGLAYER3_FLAG_PADDING_ISO MPEGLAYER3_FLAG_PADDING_ON MPEGLAYER3_FLAG_PADDING_OFF Wave Format ID MPEGLAYER3_ID_UNKNOWN MPEGLAYER3_ID_MPEG MPEGLAYER3_ID_CONSTANTFRAMESIZE IMA/DVI ADPCM Wave Format Work in progress parameterless constructor for Marshalling Creates a new IMA / DVI ADPCM Wave Format Sample Rate Number of channels Bits Per Sample A sample provider mixer, allowing inputs to be added and removed Creates a new MixingSampleProvider, with no inputs, but a specified WaveFormat The WaveFormat of this mixer. All inputs must be in this format Creates a new MixingSampleProvider, based on the given inputs Mixer inputs - must all have the same waveformat, and must all be of the same WaveFormat Adds a new mixer input Mixer input Removes a mixer input Mixer input to remove Removes all mixer inputs Reads samples from this sample provider Sample buffer Offset into sample buffer Number of samples required Number of samples read The output WaveFormat of this sample provider Interop structure for ACM stream headers. ACMSTREAMHEADER http://msdn.microsoft.com/en-us/library/dd742926%28VS.85%29.aspx Audio Endpoint Volume Volume Step Up Volume Step Down Creates a new Audio endpoint volume IAudioEndpointVolume COM interface Dispose Finalizer On Volume Notification Volume Range Hardware Support Step Information Channels Master Volume Level Master Volume Level Scalar Mute Helper methods for working with audio buffers Ensures the buffer is big enough Ensures the buffer is big enough class representing the capabilities of a MIDI out device MIDIOUTCAPS: http://msdn.microsoft.com/en-us/library/dd798467%28VS.85%29.aspx Queries whether a particular channel is supported Channel number to test True if the channel is supported Gets the manufacturer of this device Gets the product identifier (manufacturer specific) Gets the product name Returns the number of supported voices Gets the polyphony of the device Returns true if the device supports all channels Returns true if the device supports patch caching Returns true if the device supports separate left and right volume Returns true if the device supports MIDI stream out Returns true if the device supports volume control Returns the type of technology used by this MIDI out device MIDICAPS_VOLUME separate left-right volume control MIDICAPS_LRVOLUME MIDICAPS_CACHE MIDICAPS_STREAM driver supports midiStreamOut directly Class able to read a MIDI file Opens a MIDI file for reading Name of MIDI file Opens a MIDI file for reading Name of MIDI file If true will error on non-paired note events Describes the MIDI file A string describing the MIDI file and its events Exports a MIDI file Filename to export to Events to export MIDI File format The collection of events in this MIDI file Number of tracks in this MIDI file Delta Ticks Per Quarter Note TrackView is a control similar to those found in the main view of DAWs, showing time in the X axis and tracks / channels in the Y It is currently in the preliminary stages of development Required designer variable. Clean up any resources being used. true if managed resources should be disposed; otherwise, false. Required method for Designer support - do not modify the contents of this method with the code editor. Create a new trackview control Mouse click event handler Right-click detected The tracks displayed by this control The location of the current time cursor Pixels per second. Effectively a zoom level SoundFont instrument instrument name Zones uuids.h, ksuuids.h MediaErr.h Converts an IWaveProvider containing 24 bit PCM to an ISampleProvider Initialises a new instance of Pcm24BitToSampleProvider Source Wave Provider Reads floating point samples from this sample provider sample buffer offset within sample buffer to write to number of samples required number of samples provided Buffered WaveProvider taking source data from WaveIn Creates a new WaveInProvider n.b. Should make sure the WaveFormat is set correctly on IWaveIn before calling The source of wave data Reads data from the WaveInProvider The WaveFormat WaveBuffer class use to store wave datas. Data can be manipulated with arrays (,,, ) that are pointing to the same memory buffer. Use the associated Count property based on the type of buffer to get the number of data in the buffer. Implicit casting is now supported to float[], byte[], int[], short[]. You must not use Length on returned arrays. n.b. FieldOffset is 8 now to allow it to work natively on 64 bit IWaveBuffer interface use to store wave datas. Data can be manipulated with arrays (,, , ) that are pointing to the same memory buffer. This is a requirement for all subclasses. Use the associated Count property based on the type of buffer to get the number of data in the buffer. for the standard implementation using C# unions. Gets the byte buffer. The byte buffer. Gets the float buffer. The float buffer. Gets the short buffer. The short buffer. Gets the int buffer. The int buffer. Gets the max size in bytes of the byte buffer.. Maximum number of bytes in the buffer. Gets the byte buffer count. The byte buffer count. Gets the float buffer count. The float buffer count. Gets the short buffer count. The short buffer count. Gets the int buffer count. The int buffer count. Number of Bytes Initializes a new instance of the class. The number of bytes. The size of the final buffer will be aligned on 4 Bytes (upper bound) Initializes a new instance of the class binded to a specific byte buffer. A byte buffer to bound the WaveBuffer to. Binds this WaveBuffer instance to a specific byte buffer. A byte buffer to bound the WaveBuffer to. Performs an implicit conversion from to . The wave buffer. The result of the conversion. Performs an implicit conversion from to . The wave buffer. The result of the conversion. Performs an implicit conversion from to . The wave buffer. The result of the conversion. Performs an implicit conversion from to . The wave buffer. The result of the conversion. Clears the associated buffer. Copy this WaveBuffer to a destination buffer up to ByteBufferCount bytes. Checks the validity of the count parameters. Name of the arg. The value. The size of value. Gets the byte buffer. The byte buffer. Gets the float buffer. The float buffer. Gets the short buffer. The short buffer. Gets the int buffer. The int buffer. Gets the max size in bytes of the byte buffer.. Maximum number of bytes in the buffer. Gets or sets the byte buffer count. The byte buffer count. Gets or sets the float buffer count. The float buffer count. Gets or sets the short buffer count. The short buffer count. Gets or sets the int buffer count. The int buffer count. A wave file writer that adds cue support Writes a wave file, including a cues chunk Adds a cue to the Wave file Sample position Label text Updates the header, and writes the cues out WaveFormatExtensible http://www.microsoft.com/whdc/device/audio/multichaud.mspx Parameterless constructor for marshalling Creates a new WaveFormatExtensible for PCM or IEEE Serialize String representation SubFormat (may be one of AudioMediaSubtypes) Microsoft ADPCM See http://icculus.org/SDL_sound/downloads/external_documentation/wavecomp.htm Empty constructor needed for marshalling from a pointer Microsoft ADPCM Sample Rate Channels Serializes this wave format Binary writer String Description of this WaveFormat Samples per block Number of coefficients Coefficients Helper function to avoid creating a new buffer every read A very basic circular buffer implementation Create a new circular buffer Max buffer size in bytes Write data to the buffer Data to write Offset into data Number of bytes to write number of bytes written Read from the buffer Buffer to read into Offset into read buffer Bytes to read Number of bytes actually read Resets the buffer Advances the buffer, discarding bytes Bytes to advance Maximum length of this circular buffer Number of bytes currently stored in the circular buffer Represents a MIDI sysex message Reads a sysex message from a MIDI stream Stream of MIDI data a new sysex message Describes this sysex message A string describing the sysex message Calls base class export first, then exports the data specific to this event MidiEvent.Export A helper class to manage collection of MIDI events It has the ability to organise them in tracks Creates a new Midi Event collection Initial file type Delta Ticks Per Quarter Note Gets events on a specified track Track number The list of events Adds a new track The new track event list Adds a new track Initial events to add to the new track The new track event list Removes a track Track number to remove Clears all events Adds an event to the appropriate track depending on file type The event to be added The original (or desired) track number When adding events in type 0 mode, the originalTrack parameter is ignored. If in type 1 mode, it will use the original track number to store the new events. If the original track was 0 and this is a channel based event, it will create new tracks if necessary and put it on the track corresponding to its channel number Sorts, removes empty tracks and adds end track markers Gets an enumerator for the lists of track events Gets an enumerator for the lists of track events The number of tracks The absolute time that should be considered as time zero Not directly used here, but useful for timeshifting applications The number of ticks per quarter note Gets events on a specific track Track number The list of events The MIDI file type MIDI command codes Note Off Note On Key After-touch Control change Patch change Channel after-touch Pitch wheel change Sysex message Eox (comes at end of a sysex message) Timing clock (used when synchronization is required) Start sequence Continue sequence Stop sequence Auto-Sensing Meta-event Represents a MIDI key signature event event Represents a MIDI meta event Empty constructor Custom constructor for use by derived types, who will manage the data themselves Meta event type Meta data length Absolute time Reads a meta-event from a stream A binary reader based on the stream of MIDI data A new MetaEvent object Describes this Meta event String describing the metaevent Gets the type of this meta event Reads a new track sequence number event from a MIDI stream The MIDI stream the data length Creates a new Key signature event with the specified data Describes this event String describing the event Calls base class export first, then exports the data specific to this event MidiEvent.Export Number of sharps or flats Major or Minor key The timeline control displays a time-grid Features to add: - Time vs MBFT - markers, marker dragging - clicking new time - range selection - zoom level Creates a new timeline control Forecolor changed event handler Paint event handler Mouse down event handler Required designer variable. Clean up any resources being used. true if managed resources should be disposed; otherwise, false. Required method for Designer support - do not modify the contents of this method with the code editor. Position clicked event The current time Pixels per second. Effectively a zoom level TimeLine Position Clicked event arguments Creates a new TimeLinePositionClickedEventArgs The position clicked Sample Link Type Mono Sample Right Sample Left Sample Linked Sample ROM Mono Sample ROM Right Sample ROM Left Sample ROM Linked Sample A shift buffer creates a new shift buffer Add samples to the buffer Return samples from the buffer Multimedia Device Collection Get Enumerator Device enumerator Device count Get device by index Device index Device at the specified index AUDCLNT_SHAREMODE AUDCLNT_SHAREMODE_SHARED, AUDCLNT_SHAREMODE_EXCLUSIVE DMO Output Data Buffer Creates a new DMO Output Data Buffer structure Maximum buffer size Dispose Retrives the data in this buffer Buffer to receive data Offset into buffer Media Buffer Length of data in buffer Status Flags Timestamp Duration Is more data available If true, ProcessOuput should be called again http://msdn.microsoft.com/en-us/library/aa929922.aspx DMO_MEDIA_TYPE Gets the structure as a Wave format (if it is one) Sets this object up to point to a wave format Wave format structure Major type Major type name Subtype Subtype name Fixed size samples Sample size Format type Format type name WaveStream that passes through an ACM Codec Base class for all WaveStream classes. Derives from stream. Flush does not need to do anything See An alternative way of repositioning. See Sets the length of the WaveStream. Not Supported. Writes to the WaveStream. Not Supported. Moves forward or backwards the specified number of seconds in the stream Number of seconds to move, can be negative Whether the WaveStream has non-zero sample data at the current position for the specified count Number of bytes to read Retrieves the WaveFormat for this stream We can read from this stream We can seek within this stream We can't write to this stream The block alignment for this wavestream. Do not modify the Position to anything that is not a whole multiple of this value The current position in the stream in Time format Total length in real-time of the stream (may be an estimate for compressed files) Creates a stream that can convert to PCM The source stream A PCM stream Create a new WaveFormat conversion stream Desired output format Source stream Converts source bytes to destination bytes Converts destination bytes to source bytes Reads bytes from this stream Buffer to read into Offset in array to read into Number of bytes to read Number of bytes read Disposes this stream true if the user called this Returns the stream length Gets or sets the current position in the stream Gets the WaveFormat of this stream Gets the block alignment for this stream Converts an IWaveProvider containing 16 bit PCM to an ISampleProvider Initialises a new instance of Pcm16BitToSampleProvider Source wave provider Reads samples from this sample provider Sample buffer Offset into sample buffer Samples required Number of samples read Class for reading from MP3 files Supports opening a MP3 file Opens MP3 from a stream rather than a file Will not dispose of this stream itself Gets the total length of this file in milliseconds. Reads the next mp3 frame Next mp3 frame, or null if EOF Reads the next mp3 frame Next mp3 frame, or null if EOF Reads decompressed PCM data from our MP3 file. Disposes this WaveStream The MP3 wave format (n.b. NOT the output format of this stream - see the WaveFormat property) ID3v2 tag if present ID3v1 tag if present This is the length in bytes of data available to be read out from the Read method (i.e. the decompressed MP3 length) n.b. this may return 0 for files whose length is unknown Xing header if present Represents a wave out device Represents the interface to a device that can play a WaveFile Begin playback Stop playback Pause Playback Initialise playback The waveprovider to be played Current playback state The volume 1.0 is full scale Indicates that playback has gone into a stopped state due to reaching the end of the input stream Retrieves the capabilities of a waveOut device Device to test The WaveOut device capabilities Creates a default WaveOut device Will use window callbacks if called from a GUI thread, otherwise function callbacks Creates a WaveOut device using the specified window handle for callbacks A valid window handle Opens a WaveOut device Initialises the WaveOut device WaveProvider to play Start playing the audio from the WaveStream Pause the audio Resume playing after a pause from the same position Stop and reset the WaveOut device Gets the current position in bytes from the wave output device. (n.b. this is not the same thing as the position within your reader stream - it calls directly into waveOutGetPosition) Position in bytes Closes this WaveOut device Closes the WaveOut device and disposes of buffers True if called from Dispose Finalizer. Only called when user forgets to call Dispose Indicates playback has stopped automatically Returns the number of Wave Out devices available in the system Gets or sets the desired latency in milliseconds Should be set before a call to Init Gets or sets the number of buffers used Should be set before a call to Init Gets or sets the device number Should be set before a call to Init This must be between 0 and DeviceCount - 1. Playback State Volume for this device 1.0 is full scale Wave Header Flags enumeration WHDR_BEGINLOOP This buffer is the first buffer in a loop. This flag is used only with output buffers. WHDR_DONE Set by the device driver to indicate that it is finished with the buffer and is returning it to the application. WHDR_ENDLOOP This buffer is the last buffer in a loop. This flag is used only with output buffers. WHDR_INQUEUE Set by Windows to indicate that the buffer is queued for playback. WHDR_PREPARED Set by Windows to indicate that the buffer has been prepared with the waveInPrepareHeader or waveOutPrepareHeader function. ACMFORMATTAGDETAILS_FORMATTAG_CHARS DWORD cbStruct; DWORD dwFormatTagIndex; DWORD dwFormatTag; DWORD cbFormatSize; DWORD fdwSupport; DWORD cStandardFormats; TCHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS]; MM Device To string Audio Client Audio Meter Information Audio Endpoint Volume Properties Friendly name for the endpoint Friendly name of device Device ID Data Flow Device State Endpoint Hardware Support Volume Mute Meter Represents a MIDI time signature event Reads a new time signature event from a MIDI stream The MIDI stream The data length Creates a new TimeSignatureEvent Time at which to create this event Numerator Denominator Ticks in Metronome Click No of 32nd Notes in Quarter Click Creates a new time signature event with the specified parameters Describes this time signature event A string describing this event Calls base class export first, then exports the data specific to this event MidiEvent.Export Numerator Denominator Ticks in a metronome click Number of 32nd notes in a quarter note The time signature MidiController enumeration Modulation Main volume Pan Expression Sustain Reset all controllers All notes off Interface for MP3 frame by frame decoder Decompress a single MP3 frame Frame to decompress Output buffer Offset within output buffer Bytes written to output buffer PCM format that we are converting into MP3 Frame decompressor using the Windows Media MP3 Decoder DMO object Initializes a new instance of the DMO MP3 Frame decompressor Decompress a single frame of MP3 Dispose of this obejct and clean up resources Converted PCM WaveFormat Represents a Cakewalk Drum Map file (.map) Parses a Cakewalk Drum Map file Path of the .map file Describes this drum map The drum mappings in this drum map MP_PARAMINFO MP_TYPE MPT_INT MPT_FLOAT MPT_BOOL MPT_ENUM MPT_MAX MP_CURVE_TYPE Media Object Creates a new Media Object Media Object COM interface Gets the input media type for the specified input stream Input stream index Input type index DMO Media Type or null if there are no more input types Gets the DMO Media Output type The output stream Output type index DMO Media Type or null if no more available retrieves the media type that was set for an output stream, if any Output stream index DMO Media Type or null if no more available Enumerates the supported input types Input stream index Enumeration of input types Enumerates the output types Output stream index Enumeration of supported output types Querys whether a specified input type is supported Input stream index Media type to check true if supports Sets the input type helper method Input stream index Media type Flags (can be used to test rather than set) Sets the input type Input stream index Media Type Sets the input type to the specified Wave format Input stream index Wave format Requests whether the specified Wave format is supported as an input Input stream index Wave format true if supported Helper function to make a DMO Media Type to represent a particular WaveFormat Checks if a specified output type is supported n.b. you may need to set the input type first Output stream index Media type True if supported Tests if the specified Wave Format is supported for output n.b. may need to set the input type first Output stream index Wave format True if supported Helper method to call SetOutputType Sets the output type n.b. may need to set the input type first Output stream index Media type to set Set output type to the specified wave format n.b. may need to set input type first Output stream index Wave format Get Input Size Info Input Stream Index Input Size Info Get Output Size Info Output Stream Index Output Size Info Process Input Input Stream index Media Buffer Flags Timestamp Duration Process Output Flags Output buffer count Output buffers Gives the DMO a chance to allocate any resources needed for streaming Tells the DMO to free any resources needed for streaming Gets maximum input latency input stream index Maximum input latency as a ref-time Flushes all buffered data Report a discontinuity on the specified input stream Input Stream index Is this input stream accepting data? Input Stream index true if accepting data Experimental code, not currently being called Not sure if it is necessary anyway Number of input streams Number of output streams DMO Guids for use with DMOEnum dmoreg.h Audio Endpoint Volume Notifiaction Delegate Audio Volume Notification Data IMediaBuffer Interface Set Length Length HRESULT Get Max Length Max Length HRESULT Get Buffer and Length Pointer to variable into which to write the Buffer Pointer Pointer to variable into which to write the Valid Data Length HRESULT Support for playback using Wasapi WASAPI Out using default audio endpoint ShareMode - shared or exclusive Desired latency in milliseconds WASAPI Out using default audio endpoint ShareMode - shared or exclusive true if sync is done with event. false use sleep. Desired latency in milliseconds Creates a new WASAPI Output Device to use true if sync is done with event. false use sleep. Begin Playback Stop playback and flush buffers Stop playback without flushing buffers Initialize for playing the specified wave stream IWaveProvider to play Dispose Playback Stopped Playback State Volume DSP Group TrueSpeech DSP Group TrueSpeech WaveFormat Writes this structure to a BinaryWriter Allows recording using the Windows waveIn APIs Events are raised as recorded buffers are made available Generic interface for wave recording Start Recording Stop Recording Recording WaveFormat Indicates recorded data is available Indicates that all recorded data has now been received. Prepares a Wave input device for recording Creates a WaveIn device using the specified window handle for callbacks A valid window handle Prepares a Wave input device for recording Retrieves the capabilities of a waveIn device Device to test The WaveIn device capabilities Called when we get a new buffer of recorded data Start recording Stop recording Dispose pattern Microphone Level Dispose method Indicates recorded data is available Indicates that all recorded data has now been received. Returns the number of Wave In devices available in the system Milliseconds for the buffer. Recommended value is 100ms Number of Buffers to use (usually 2 or 3) The device number to use WaveFormat we are recording in Summary description for WaveFilter. cbStruct dwFilterTag fdwFilter reserved ACM_STREAMOPENF_QUERY, ACM will be queried to determine whether it supports the given conversion. A conversion stream will not be opened, and no handle will be returned in the phas parameter. ACM_STREAMOPENF_ASYNC, Stream conversion should be performed asynchronously. If this flag is specified, the application can use a callback function to be notified when the conversion stream is opened and closed and after each buffer is converted. In addition to using a callback function, an application can examine the fdwStatus member of the ACMSTREAMHEADER structure for the ACMSTREAMHEADER_STATUSF_DONE flag. ACM_STREAMOPENF_NONREALTIME, ACM will not consider time constraints when converting the data. By default, the driver will attempt to convert the data in real time. For some formats, specifying this flag might improve the audio quality or other characteristics. CALLBACK_TYPEMASK, callback type mask CALLBACK_NULL, no callback CALLBACK_WINDOW, dwCallback is a HWND CALLBACK_TASK, dwCallback is a HTASK CALLBACK_FUNCTION, dwCallback is a FARPROC CALLBACK_THREAD, thread ID replaces 16 bit task CALLBACK_EVENT, dwCallback is an EVENT Handle Helper class for registering Windows Explorer File associations Determines if the specified file type is registered The file extension including the leading period (e.g. ".wav") True if it is registered Gets the HKCR key name for the extenstion The file extension including the leading period (e.g. ".wav") The HKCR key name or null if not registered Registers a file type in Windows Extension include leading '.' The description of this file type Null for no icon or e.g c:\windows\regedit.exe,0 Adds a new explorer context menu action for this file type Will overwrite any existing action with this key The file extension (include the leading dot) A unique key for this action What will appear on the context menu The command to execute Removes an explorer context menu action from a file extension The file extension (include the leading dot) The unique key used to register this action Describes the event that has occurred. Typically, only one event is specified at a time. If more than one event is specified, the values contained in the dwItem1 and dwItem2 parameters must be the same, respectively, for all specified events. This parameter can be one or more of the following values. Windows NT/2000/XP: dwItem2 contains the index in the system image list that has changed. dwItem1 is not used and should be . Windows 95/98: dwItem1 contains the index in the system image list that has changed. dwItem2 is not used and should be . All events have occurred. A file type association has changed. must be specified in the uFlags parameter. dwItem1 and dwItem2 are not used and must be . The attributes of an item or folder have changed. or must be specified in uFlags. dwItem1 contains the item or folder that has changed. dwItem2 is not used and should be . A nonfolder item has been created. or must be specified in uFlags. dwItem1 contains the item that was created. dwItem2 is not used and should be . A nonfolder item has been deleted. or must be specified in uFlags. dwItem1 contains the item that was deleted. dwItem2 is not used and should be . A drive has been added. or must be specified in uFlags. dwItem1 contains the root of the drive that was added. dwItem2 is not used and should be . A drive has been added and the Shell should create a new window for the drive. or must be specified in uFlags. dwItem1 contains the root of the drive that was added. dwItem2 is not used and should be . A drive has been removed. or must be specified in uFlags. dwItem1 contains the root of the drive that was removed. dwItem2 is not used and should be . Not currently used. The amount of free space on a drive has changed. or must be specified in uFlags. dwItem1 contains the root of the drive on which the free space changed. dwItem2 is not used and should be . Storage media has been inserted into a drive. or must be specified in uFlags. dwItem1 contains the root of the drive that contains the new media. dwItem2 is not used and should be . Storage media has been removed from a drive. or must be specified in uFlags. dwItem1 contains the root of the drive from which the media was removed. dwItem2 is not used and should be . A folder has been created. or must be specified in uFlags. dwItem1 contains the folder that was created. dwItem2 is not used and should be . A folder on the local computer is being shared via the network. or must be specified in uFlags. dwItem1 contains the folder that is being shared. dwItem2 is not used and should be . A folder on the local computer is no longer being shared via the network. or must be specified in uFlags. dwItem1 contains the folder that is no longer being shared. dwItem2 is not used and should be . The name of a folder has changed. or must be specified in uFlags. dwItem1 contains the previous pointer to an item identifier list (PIDL) or name of the folder. dwItem2 contains the new PIDL or name of the folder. The name of a nonfolder item has changed. or must be specified in uFlags. dwItem1 contains the previous PIDL or name of the item. dwItem2 contains the new PIDL or name of the item. A folder has been removed. or must be specified in uFlags. dwItem1 contains the folder that was removed. dwItem2 is not used and should be . The computer has disconnected from a server. or must be specified in uFlags. dwItem1 contains the server from which the computer was disconnected. dwItem2 is not used and should be . The contents of an existing folder have changed, but the folder still exists and has not been renamed. or must be specified in uFlags. dwItem1 contains the folder that has changed. dwItem2 is not used and should be . If a folder has been created, deleted, or renamed, use SHCNE_MKDIR, SHCNE_RMDIR, or SHCNE_RENAMEFOLDER, respectively, instead. An image in the system image list has changed. must be specified in uFlags. Flags that indicate the meaning of the dwItem1 and dwItem2 parameters. The uFlags parameter must be one of the following values. The dwItem1 and dwItem2 parameters are DWORD values. dwItem1 and dwItem2 are the addresses of ITEMIDLIST structures that represent the item(s) affected by the change. Each ITEMIDLIST must be relative to the desktop folder. dwItem1 and dwItem2 are the addresses of null-terminated strings of maximum length MAX_PATH that contain the full path names of the items affected by the change. dwItem1 and dwItem2 are the addresses of null-terminated strings of maximum length MAX_PATH that contain the full path names of the items affected by the change. dwItem1 and dwItem2 are the addresses of null-terminated strings that represent the friendly names of the printer(s) affected by the change. dwItem1 and dwItem2 are the addresses of null-terminated strings that represent the friendly names of the printer(s) affected by the change. The function should not return until the notification has been delivered to all affected components. As this flag modifies other data-type flags, it cannot by used by itself. The function should begin delivering notifications to all affected components but should return as soon as the notification process has begun. As this flag modifies other data-type flags, it cannot by used by itself. Represents a MIDI out device Gets the MIDI Out device info Opens a specified MIDI out device The device number Closes this MIDI out device Closes this MIDI out device Resets the MIDI out device Sends a MIDI out message Message Parameter 1 Parameter 2 Sends a MIDI message to the MIDI out device The message to send Closes the MIDI out device True if called from Dispose Cleanup Gets the number of MIDI devices available in the system Gets or sets the volume for this MIDI out device MIM_OPEN MIM_CLOSE MIM_DATA MIM_LONGDATA MIM_ERROR MIM_LONGERROR MIM_MOREDATA MOM_OPEN MOM_CLOSE MOM_DONE LCD panel control Required designer variable. Creates a new LCD panel Clean up any resources being used. Required method for Designer support - do not modify the contents of this method with the code editor. Pixel colour for pixels turned off Pixel colour for pixels turned on An ID3v2 Tag Reads an ID3v2 tag from a stream Raw data from this tag Audio Render Client Gets a pointer to the buffer Number of frames requested Pointer to the buffer Release buffer Number of frames written Buffer flags Release the COM object mu-law decoder based on code from: http://hazelware.luggle.com/tutorials/mulawcompression.html only 512 bytes required, so just use a lookup Converts a mu-law encoded byte to a 16 bit linear sample mu-law encoded byte Linear sample From wmcodecsdp.h Implements: - IMediaObject - IMFTransform (Media foundation - we will leave this for now as there is loads of MF stuff) - IPropertyStore - IWMResamplerProps Can resample PCM or IEEE Resampler Creates a new Resampler based on the DMO Resampler Dispose code - experimental at the moment Was added trying to track down why Resampler crashes NUnit This code not currently being called by ResamplerDmoStream Media Object Holds information about a RIFF file chunk Creates a RiffChunk object The chunk identifier The chunk identifier converted to a string The chunk length The stream position this chunk is located at An interface for WaveStreams which can report notification of individual samples A sample has been detected Sample event arguments Constructor Left sample Right sample WaveInCapabilities structure (based on WAVEINCAPS from mmsystem.h) http://msdn.microsoft.com/en-us/library/ms713726(VS.85).aspx wMid wPid vDriverVersion Product Name (szPname) Supported formats (bit flags) dwFormats Supported channels (1 for mono 2 for stereo) (wChannels) Seems to be set to -1 on a lot of devices wReserved1 Number of channels supported The product name Flags indicating what support a particular ACM driver has ACMDRIVERDETAILS_SUPPORTF_CODEC - Codec ACMDRIVERDETAILS_SUPPORTF_CONVERTER - Converter ACMDRIVERDETAILS_SUPPORTF_FILTER - Filter ACMDRIVERDETAILS_SUPPORTF_HARDWARE - Hardware ACMDRIVERDETAILS_SUPPORTF_ASYNC - Async ACMDRIVERDETAILS_SUPPORTF_LOCAL - Local ACMDRIVERDETAILS_SUPPORTF_DISABLED - Disabled Represents an unsigned mixer control Represents a mixer control Mixer Handle Number of Channels Mixer Handle Type Gets all the mixer controls Gets a specified Mixer Control Mixer Handle Line ID Control ID Number of Channels Flags to use (indicates the meaning of mixerHandle) Gets the control details Gets the control details Returns true if this is a boolean control Control type Determines whether a specified mixer control type is a list text control String representation for debug purposes Mixer control name Mixer control type Is this a boolean control True if this is a list text control True if this is a signed control True if this is an unsigned control True if this is a custom control Gets the details for this control String Representation for debugging purposes The control value The control's minimum value The control's maximum value Value of the control represented as a percentage Mixer Line Component type enumeration Audio line is a destination that cannot be defined by one of the standard component types. A mixer device is required to use this component type for line component types that have not been defined by Microsoft Corporation. MIXERLINE_COMPONENTTYPE_DST_UNDEFINED Audio line is a digital destination (for example, digital input to a DAT or CD audio device). MIXERLINE_COMPONENTTYPE_DST_DIGITAL Audio line is a line level destination (for example, line level input from a CD audio device) that will be the final recording source for the analog-to-digital converter (ADC). Because most audio cards for personal computers provide some sort of gain for the recording audio source line, the mixer device will use the MIXERLINE_COMPONENTTYPE_DST_WAVEIN type. MIXERLINE_COMPONENTTYPE_DST_LINE Audio line is a destination used for a monitor. MIXERLINE_COMPONENTTYPE_DST_MONITOR Audio line is an adjustable (gain and/or attenuation) destination intended to drive speakers. This is the typical component type for the audio output of audio cards for personal computers. MIXERLINE_COMPONENTTYPE_DST_SPEAKERS Audio line is an adjustable (gain and/or attenuation) destination intended to drive headphones. Most audio cards use the same audio destination line for speakers and headphones, in which case the mixer device simply uses the MIXERLINE_COMPONENTTYPE_DST_SPEAKERS type. MIXERLINE_COMPONENTTYPE_DST_HEADPHONES Audio line is a destination that will be routed to a telephone line. MIXERLINE_COMPONENTTYPE_DST_TELEPHONE Audio line is a destination that will be the final recording source for the waveform-audio input (ADC). This line typically provides some sort of gain or attenuation. This is the typical component type for the recording line of most audio cards for personal computers. MIXERLINE_COMPONENTTYPE_DST_WAVEIN Audio line is a destination that will be the final recording source for voice input. This component type is exactly like MIXERLINE_COMPONENTTYPE_DST_WAVEIN but is intended specifically for settings used during voice recording/recognition. Support for this line is optional for a mixer device. Many mixer devices provide only MIXERLINE_COMPONENTTYPE_DST_WAVEIN. MIXERLINE_COMPONENTTYPE_DST_VOICEIN Audio line is a source that cannot be defined by one of the standard component types. A mixer device is required to use this component type for line component types that have not been defined by Microsoft Corporation. MIXERLINE_COMPONENTTYPE_SRC_UNDEFINED Audio line is a digital source (for example, digital output from a DAT or audio CD). MIXERLINE_COMPONENTTYPE_SRC_DIGITAL Audio line is a line-level source (for example, line-level input from an external stereo) that can be used as an optional recording source. Because most audio cards for personal computers provide some sort of gain for the recording source line, the mixer device will use the MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY type. MIXERLINE_COMPONENTTYPE_SRC_LINE Audio line is a microphone recording source. Most audio cards for personal computers provide at least two types of recording sources: an auxiliary audio line and microphone input. A microphone audio line typically provides some sort of gain. Audio cards that use a single input for use with a microphone or auxiliary audio line should use the MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE component type. MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE Audio line is a source originating from the output of an internal synthesizer. Most audio cards for personal computers provide some sort of MIDI synthesizer (for example, an Adlib®-compatible or OPL/3 FM synthesizer). MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER Audio line is a source originating from the output of an internal audio CD. This component type is provided for audio cards that provide an audio source line intended to be connected to an audio CD (or CD-ROM playing an audio CD). MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC Audio line is a source originating from an incoming telephone line. MIXERLINE_COMPONENTTYPE_SRC_TELEPHONE Audio line is a source originating from personal computer speaker. Several audio cards for personal computers provide the ability to mix what would typically be played on the internal speaker with the output of an audio card. Some audio cards support the ability to use this output as a recording source. MIXERLINE_COMPONENTTYPE_SRC_PCSPEAKER Audio line is a source originating from the waveform-audio output digital-to-analog converter (DAC). Most audio cards for personal computers provide this component type as a source to the MIXERLINE_COMPONENTTYPE_DST_SPEAKERS destination. Some cards also allow this source to be routed to the MIXERLINE_COMPONENTTYPE_DST_WAVEIN destination. MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT Audio line is a source originating from the auxiliary audio line. This line type is intended as a source with gain or attenuation that can be routed to the MIXERLINE_COMPONENTTYPE_DST_SPEAKERS destination and/or recorded from the MIXERLINE_COMPONENTTYPE_DST_WAVEIN destination. MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY Audio line is an analog source (for example, analog output from a video-cassette tape). MIXERLINE_COMPONENTTYPE_SRC_ANALOG Represents a mixer line (source or destination) Creates a new mixer destination Mixer Handle Destination Index Mixer Handle Type Creates a new Mixer Source For a Specified Source Mixer Handle Destination Index Source Index Flag indicating the meaning of mixerHandle Creates a new Mixer Source Wave In Device Gets the specified source Describes this Mixer Line (for diagnostic purposes) Mixer Line Name Mixer Line short name The line ID Component Type Mixer destination type description Number of channels Number of sources Number of controls Is this destination active Is this destination disconnected Is this destination a source Enumerator for the controls on this Mixer Limne Enumerator for the sources on this Mixer Line The name of the target output device Custom Mixer control Get the data for this custom control pointer to memory to receive data MIDI In Device Capabilities wMid wPid vDriverVersion Product Name Support - Reserved Gets the manufacturer of this device Gets the product identifier (manufacturer specific) Gets the product name Implements a rudimentary volume meter Required designer variable. Clean up any resources being used. true if managed resources should be disposed; otherwise, false. Required method for Designer support - do not modify the contents of this method with the code editor. Basic volume meter On Fore Color Changed Paints the volume meter Current Value Minimum decibels Maximum decibels Meter orientation Controller Sources No Controller Note On Velocity Note On Key Number Poly Pressure Channel Pressure Pitch Wheel Pitch Wheel Sensitivity Source Types Linear Concave Convex Switch Modulator Type Soundfont generator Gets the generator type Generator amount as an unsigned short Generator amount as a signed short Low byte amount High byte amount Instrument Sample Header Summary description for ImpulseResponseConvolution. Creates a new Impulse Response Convolution Class A very simple mono convolution algorithm This will be very slow This is actually a downwards normalize for data that will clip Utility class that takes an IWaveProvider input at any bit depth and exposes it as an ISampleProvider. Turns mono inputs into stereo, and allows adjusting of volume (The eventual successor to WaveChannel32) This class also serves as an example of how you can link together several simple Sample Providers to form a more useful class. Initialises a new instance of SampleChannel Source wave provider, must be PCM or IEEE Reads samples from this sample provider Sample buffer Offset into sample buffer Number of samples desired Number of samples read The WaveFormat of this Sample Provider Allows adjusting the volume, 1.0f = full volume Raised periodically to inform the user of the max volume (before the volume meter) Base class for creating a 16 bit wave provider Initializes a new instance of the WaveProvider16 class defaulting to 44.1kHz mono Initializes a new instance of the WaveProvider16 class with the specified sample rate and number of channels Allows you to specify the sample rate and channels for this WaveProvider (should be initialised before you pass it to a wave player) Implements the Read method of IWaveProvider by delegating to the abstract Read method taking a short array Method to override in derived classes Supply the requested number of samples into the buffer The Wave Format Wave Callback Info Sets up a new WaveCallbackInfo for function callbacks Sets up a new WaveCallbackInfo to use a New Window IMPORTANT: only use this on the GUI thread Sets up a new WaveCallbackInfo to use an existing window IMPORTANT: only use this on the GUI thread Callback Strategy Window Handle (if applicable) Interop definitions for Windows ACM (Audio Compression Manager) API http://msdn.microsoft.com/en-us/library/dd742916%28VS.85%29.aspx MMRESULT acmFormatSuggest( HACMDRIVER had, LPWAVEFORMATEX pwfxSrc, LPWAVEFORMATEX pwfxDst, DWORD cbwfxDst, DWORD fdwSuggest); http://msdn.microsoft.com/en-us/library/dd742928%28VS.85%29.aspx MMRESULT acmStreamOpen( LPHACMSTREAM phas, HACMDRIVER had, LPWAVEFORMATEX pwfxSrc, LPWAVEFORMATEX pwfxDst, LPWAVEFILTER pwfltr, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen A version with pointers for troubleshooting http://msdn.microsoft.com/en-us/library/dd742910%28VS.85%29.aspx UINT ACMFORMATCHOOSEHOOKPROC acmFormatChooseHookProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam ASIODriverCapability holds all the information from the ASIODriver. Use ASIODriverExt to get the Capabilities Callback used by the ASIODriverExt to get wave data ASIODriverExt is a simplified version of the ASIODriver. It provides an easier way to access the capabilities of the Driver and implement the callbacks necessary for feeding the driver. Implementation inspired from Rob Philpot's with a managed C++ ASIO wrapper BlueWave.Interop.Asio http://www.codeproject.com/KB/mcpp/Asio.Net.aspx Contributor: Alexandre Mutel - email: alexandre_mutel at yahoo.fr Initializes a new instance of the class based on an already instantiated ASIODriver instance. A ASIODriver already instantiated. Allows adjustment of which is the first output channel we write to Channel offset Starts playing the buffers. Stops playing the buffers. Shows the control panel. Releases this instance. Determines whether the specified sample rate is supported. The sample rate. true if [is sample rate supported]; otherwise, false. Sets the sample rate. The sample rate. Creates the buffers for playing. The number of outputs channels. if set to true [use max buffer size] else use Prefered size Builds the capabilities internally. Callback called by the ASIODriver on fill buffer demand. Redirect call to external callback. Index of the double buffer. if set to true [direct process]. Callback called by the ASIODriver on event "Samples rate changed". The sample rate. Asio message call back. The selector. The value. The message. The opt. Buffers switch time info call back. The asio time param. Index of the double buffer. if set to true [direct process]. Gets the driver used. The ASIOdriver. Gets or sets the fill buffer callback. The fill buffer callback. Gets the capabilities of the ASIODriver. The capabilities. Mixer Interop Flags MIXER_OBJECTF_HANDLE = 0x80000000; MIXER_OBJECTF_MIXER = 0x00000000; MIXER_OBJECTF_HMIXER MIXER_OBJECTF_WAVEOUT MIXER_OBJECTF_HWAVEOUT MIXER_OBJECTF_WAVEIN MIXER_OBJECTF_HWAVEIN MIXER_OBJECTF_MIDIOUT MIXER_OBJECTF_HMIDIOUT MIXER_OBJECTF_MIDIIN MIXER_OBJECTF_HMIDIIN MIXER_OBJECTF_AUX MIXER_GETCONTROLDETAILSF_VALUE = 0x00000000; MIXER_SETCONTROLDETAILSF_VALUE = 0x00000000; MIXER_GETCONTROLDETAILSF_LISTTEXT = 0x00000001; MIXER_SETCONTROLDETAILSF_LISTTEXT = 0x00000001; MIXER_GETCONTROLDETAILSF_QUERYMASK = 0x0000000F; MIXER_SETCONTROLDETAILSF_QUERYMASK = 0x0000000F; MIXER_GETLINECONTROLSF_QUERYMASK = 0x0000000F; MIXER_GETLINECONTROLSF_ALL = 0x00000000; MIXER_GETLINECONTROLSF_ONEBYID = 0x00000001; MIXER_GETLINECONTROLSF_ONEBYTYPE = 0x00000002; MIXER_GETLINEINFOF_DESTINATION = 0x00000000; MIXER_GETLINEINFOF_SOURCE = 0x00000001; MIXER_GETLINEINFOF_LINEID = 0x00000002; MIXER_GETLINEINFOF_COMPONENTTYPE = 0x00000003; MIXER_GETLINEINFOF_TARGETTYPE = 0x00000004; MIXER_GETLINEINFOF_QUERYMASK = 0x0000000F; Represents a Sequencer Specific event Reads a new sequencer specific event from a MIDI stream The MIDI stream The data length Creates a new Sequencer Specific event The sequencer specific data Absolute time of this event Describes this MIDI text event A string describing this event Calls base class export first, then exports the data specific to this event MidiEvent.Export The contents of this sequencer specific Represents the different types of technology used by a MIDI out device from mmsystem.h The device is a MIDI port The device is a MIDI synth The device is a square wave synth The device is an FM synth The device is a MIDI mapper The device is a WaveTable synth The device is a software synth Utility class for comparing MidiEvent objects Compares two MidiEvents Sorts by time, with EndTrack always sorted to the end SoundFont Version Structure Major Version Minor Version Class to read the SoundFont file presets chunk The Presets contained in this chunk The instruments contained in this chunk The sample headers contained in this chunk Represents an MP3 Frame Reads an MP3 frame from a stream input stream A valid MP3 frame, or null if none found Reads an MP3Frame from a stream http://mpgedit.org/mpgedit/mpeg_format/mpeghdr.htm has some good info also see http://www.codeproject.com/KB/audio-video/mpegaudioinfo.aspx A valid MP3 frame, or null if none found Constructs an MP3 frame checks if the four bytes represent a valid header, if they are, will parse the values into Mp3Frame Sample rate of this frame Frame length in bytes Bit Rate Raw frame data (includes header bytes) MPEG Version MPEG Layer Channel Mode The number of samples in this frame Audio Endpoint Volume Channel Volume Level Volume Level Scalar Helper stream that lets us read from compressed audio files with large block alignment as though we could read any amount and reposition anywhere Creates a new BlockAlignReductionStream the input stream Disposes this WaveStream Reads data from this stream Block alignment of this stream Wave Format Length of this Stream Current position within stream Playback State Stopped Playing Paused Converts a mono sample provider to stereo, with a customisable pan strategy Initialises a new instance of the PanningSampleProvider Source sample provider, must be mono Reads samples from this sample provider Sample buffer Offset into sample buffer Number of samples desired Number of samples read Pan value, must be between -1 (left) and 1 (right) The pan strategy currently in use The WaveFormat of this sample provider Pair of floating point values, representing samples or multipliers Left value Right value Required Interface for a Panning Strategy Gets the left and right multipliers for a given pan value Pan value from -1 to 1 Left and right multipliers in a stereo sample pair Simplistic "balance" control - treating the mono input as if it was stereo In the centre, both channels full volume. Opposite channel decays linearly as balance is turned to to one side Gets the left and right channel multipliers for this pan value Pan value, between -1 and 1 Left and right multipliers Square Root Pan, thanks to Yuval Naveh Gets the left and right channel multipliers for this pan value Pan value, between -1 and 1 Left and right multipliers Sinus Pan, thanks to Yuval Naveh Gets the left and right channel multipliers for this pan value Pan value, between -1 and 1 Left and right multipliers Linear Pan Gets the left and right channel multipliers for this pan value Pan value, between -1 and 1 Left and right multipliers WaveOutCapabilities structure (based on WAVEOUTCAPS from mmsystem.h) http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_waveoutcaps_str.asp wMid wPid vDriverVersion Product Name (szPname) Supported formats (bit flags) dwFormats Supported channels (1 for mono 2 for stereo) (wChannels) Seems to be set to -1 on a lot of devices wReserved1 Optional functionality supported by the device Number of channels supported Whether playback control is supported The product name Supported wave formats for WaveOutCapabilities 11.025 kHz, Mono, 8-bit 11.025 kHz, Stereo, 8-bit 11.025 kHz, Mono, 16-bit 11.025 kHz, Stereo, 16-bit 22.05 kHz, Mono, 8-bit 22.05 kHz, Stereo, 8-bit 22.05 kHz, Mono, 16-bit 22.05 kHz, Stereo, 16-bit 44.1 kHz, Mono, 8-bit 44.1 kHz, Stereo, 8-bit 44.1 kHz, Mono, 16-bit 44.1 kHz, Stereo, 16-bit 44.1 kHz, Mono, 8-bit 44.1 kHz, Stereo, 8-bit 44.1 kHz, Mono, 16-bit 44.1 kHz, Stereo, 16-bit 48 kHz, Mono, 8-bit 48 kHz, Stereo, 8-bit 48 kHz, Mono, 16-bit 48 kHz, Stereo, 16-bit 96 kHz, Mono, 8-bit 96 kHz, Stereo, 8-bit 96 kHz, Mono, 16-bit 96 kHz, Stereo, 16-bit PROPERTYKEY is defined in wtypes.h Format ID Property ID n.b. WORK IN PROGRESS - this code will probably do nothing but crash at the moment Defined in AudioClient.h The GetBufferSize method retrieves the size (maximum capacity) of the endpoint buffer. An encoding that can read files with extended ASCII characters The one and only instance of this class List text mixer control Get the details for this control Memory location to read to Graph control Required designer variable. Creates a new graph control Clean up any resources being used. Required method for Designer support - do not modify the contents of this method with the code editor. sets graph data Transform Types Linear Modulator Source Modulation data type Destination generator type Amount Source Modulation Amount Type Source Transform Type DirectX Media Object Enumerator Get audio effect names Audio effect names Get audio encoder names Audio encoder names Get audio decoder names Audio decoder names AUDCLNT_E_NOT_INITIALIZED AUDCLNT_E_UNSUPPORTED_FORMAT AUDCLNT_E_DEVICE_IN_USE DMO Input Data Buffer Flags None DMO_INPUT_DATA_BUFFERF_SYNCPOINT DMO_INPUT_DATA_BUFFERF_TIME DMO_INPUT_DATA_BUFFERF_TIMELENGTH This class supports the reading of WAV files, providing a repositionable WaveStream that returns the raw data contained in the WAV file Supports opening a WAV file The WAV file format is a real mess, but we will only support the basic WAV file format which actually covers the vast majority of WAV files out there. For more WAV file format information visit www.wotsit.org. If you have a WAV file that can't be read by this class, email it to the NAudio project and we will probably fix this reader to support it Creates a Wave File Reader based on an input stream The input stream containing a WAV file including header Reads the header part of a WAV file from a stream The stream, positioned at the start of audio data The format found The position of the data chunk The length of the data chunk Additional chunks found Gets the data for the specified chunk Cleans up the resources associated with this WaveFileReader Reads bytes from the Wave File Attempts to read a sample into a float. n.b. only applicable for uncompressed formats Will normalise the value read into the range -1.0f to 1.0f if it comes from a PCM encoding False if the end of the WAV data chunk was reached Gets a list of the additional chunks found in this file This is the length of audio data contained in this WAV file, in bytes (i.e. the byte length of the data chunk, not the length of the WAV file itself) Number of Samples (if possible to calculate) This currently does not take into account number of channels, so divide again by number of channels if you want the number of audio 'frames' Position in the WAV data chunk. Converts an IWaveProvider containing 8 bit PCM to an ISampleProvider Initialises a new instance of Pcm8BitToSampleProvider Source wave provider Reads samples from this sample provider Sample buffer Offset into sample buffer Number of samples to read Number of samples read Converts 16 bit PCM to IEEE float, optionally adjusting volume along the way Creates a new Wave16toFloatProvider the source provider Helper function to avoid creating a new buffer every read Reads bytes from this wave stream The destination buffer Offset into the destination buffer Number of bytes read Number of bytes read. Volume of this channel. 1.0 = full scale Converts IEEE float to 16 bit PCM, optionally clipping and adjusting volume along the way Creates a new WaveFloatTo16Provider the source provider Helper function to avoid creating a new buffer every read Reads bytes from this wave stream The destination buffer Offset into the destination buffer Number of bytes read Number of bytes read. Volume of this channel. 1.0 = full scale Provides a buffered store of samples Read method will return queued samples or fill buffer with zeroes Now backed by a circular buffer Creates a new buffered WaveProvider WaveFormat Adds samples. Takes a copy of buffer, so that buffer can be reused if necessary Reads from this WaveProvider Will always return count bytes, since we will zero-fill the buffer if not enough available Buffer length in bytes Buffer duration If true, when the buffer is full, start throwing away data if false, AddSamples will throw an exception when buffer is full The number of buffered bytes Buffered Duration Gets the WaveFormat Helper function to avoid creating a new buffer every read Helper function to avoid creating a new buffer every read MME Wave function interop CALLBACK_NULL No callback CALLBACK_FUNCTION dwCallback is a FARPROC CALLBACK_EVENT dwCallback is an EVENT handle CALLBACK_WINDOW dwCallback is a HWND CALLBACK_THREAD callback is a thread ID WIM_OPEN WIM_CLOSE WIM_DATA WOM_CLOSE WOM_DONE WOM_OPEN ACM_FORMATSUGGESTF_WFORMATTAG ACM_FORMATSUGGESTF_NCHANNELS ACM_FORMATSUGGESTF_NSAMPLESPERSEC ACM_FORMATSUGGESTF_WBITSPERSAMPLE ACM_FORMATSUGGESTF_TYPEMASK is defined in propsys.h Mixer control types Custom Boolean meter Signed meter Peak meter Unsigned meter Boolean On Off Mute Mono Loudness Stereo Enhance Button Decibels Signed Unsigned Percent Slider Pan Q-sound pan Fader Volume Bass Treble Equaliser Single Select Mux Multiple select Mixer Micro time Milli time Event for clicking the track view Creates a new trackview clicked event Time of the cusor Track clicked on Any clip under the cursor Mouse location Time clicked on Track clicked on Clip clicked on Mouse location Control that represents a potentiometer TODO list: Optional Log scale Optional reverse scale Keyboard control Optional bitmap mode Optional complete draw mode Tooltip support Required designer variable. Clean up any resources being used. true if managed resources should be disposed; otherwise, false. Required method for Designer support - do not modify the contents of this method with the code editor. Creates a new pot control Draws the control Handles the mouse down event to allow changing value by dragging Handles the mouse up event to allow changing value by dragging Handles the mouse down event to allow changing value by dragging Value changed event Minimum Value of the Pot Maximum Value of the Pot The current value of the pot Summary description for FastFourierTransform. This computes an in-place complex-to-complex FFT x and y are the real and imaginary arrays of 2^m points. Applies a Hamming Window Index into frame Frame size (e.g. 1024) Multiplier for Hamming window Applies a Hann Window Index into frame Frame size (e.g. 1024) Multiplier for Hann window Applies a Blackman-Harris Window Index into frame Frame size (e.g. 1024) Multiplier for Blackmann-Harris window Media Object Size Info Media Object Size Info ToString Minimum Buffer Size, in bytes Max Lookahead Alignment DMO_PARTIAL_MEDIATYPE a-law decoder based on code from: http://hazelware.luggle.com/tutorials/mulawcompression.html only 512 bytes required, so just use a lookup Converts an a-law encoded byte to a 16 bit linear sample a-law encoded byte Linear sample Simply shifts the input stream in time, optionally clipping its start and end. (n.b. may include looping in the future) Creates a new WaveOffsetStream the source stream the time at which we should start reading from the source stream amount to trim off the front of the source stream length of time to play from source stream Creates a WaveOffsetStream with default settings (no offset or pre-delay, and whole length of source stream) The source stream Reads bytes from this wave stream The destination buffer Offset into the destination buffer Number of bytes read Number of bytes read. Determines whether this channel has any data to play to allow optimisation to not read, but bump position forward Disposes this WaveStream The length of time before which no audio will be played An offset into the source stream from which to start playing Length of time to read from the source stream Gets the block alignment for this WaveStream Returns the stream length Gets or sets the current position in the stream Simple class that raises an event on every sample Initializes a new instance of NotifyingSampleProvider Source Sample Provider Reads samples from this sample provider Sample buffer Offset into sample buffer Number of samples desired Number of samples read WaveFormat Sample notifier Alternative WaveOut class, making use of the Event callback Opens a WaveOut device Initialises the WaveOut device WaveProvider to play Start playing the audio from the WaveStream Pause the audio Resume playing after a pause from the same position Stop and reset the WaveOut device Closes this WaveOut device Closes the WaveOut device and disposes of buffers True if called from Dispose Finalizer. Only called when user forgets to call Dispose Indicates playback has stopped automatically Gets or sets the desired latency in milliseconds Should be set before a call to Init Gets or sets the number of buffers used Should be set before a call to Init Gets or sets the device number Should be set before a call to Init This must be between 0 and DeviceCount - 1. Playback State Obsolete property Manufacturer codes from mmreg.h Microsoft Corporation Creative Labs, Inc Media Vision, Inc. Fujitsu Corp. Artisoft, Inc. Turtle Beach, Inc. IBM Corporation Vocaltec LTD. Roland DSP Solutions, Inc. NEC ATI Wang Laboratories, Inc Tandy Corporation Voyetra Antex Electronics Corporation ICL Personal Systems Intel Corporation Advanced Gravis Video Associates Labs, Inc. InterActive Inc Yamaha Corporation of America Everex Systems, Inc Echo Speech Corporation Sierra Semiconductor Corp Computer Aided Technologies APPS Software International DSP Group, Inc microEngineering Labs Computer Friends, Inc. ESS Technology Audio, Inc. Motorola, Inc. Canopus, co., Ltd. Seiko Epson Corporation Truevision Aztech Labs, Inc. Videologic SCALACS Korg Inc. Audio Processing Technology Integrated Circuit Systems, Inc. Iterated Systems, Inc. Metheus Logitech, Inc. Winnov, Inc. NCR Corporation EXAN AST Research Inc. Willow Pond Corporation Sonic Foundry Vitec Multimedia MOSCOM Corporation Silicon Soft, Inc. Supermac Audio Processing Technology Speech Compression Ahead, Inc. Dolby Laboratories OKI AuraVision Corporation Ing C. Olivetti & C., S.p.A. I/O Magic Corporation Matsushita Electric Industrial Co., LTD. Control Resources Limited Xebec Multimedia Solutions Limited New Media Corporation Natural MicroSystems Lyrrus Inc. Compusic OPTi Computers Inc. Adlib Accessories Inc. Compaq Computer Corp. Dialogic Corporation InSoft, Inc. M.P. Technologies, Inc. Weitek Lernout & Hauspie Quanta Computer Inc. Apple Computer, Inc. Digital Equipment Corporation Mark of the Unicorn Workbit Corporation Ositech Communications Inc. miro Computer Products AG Cirrus Logic ISOLUTION B.V. Horizons Technology, Inc Computer Concepts Ltd Voice Technologies Group, Inc. Radius Rockwell International Co. XYZ for testing Opcode Systems Voxware Inc Northern Telecom Limited APICOM Grande Software ADDX Wildcat Canyon Software Rhetorex Inc Brooktree Corporation ENSONIQ Corporation FAST Multimedia AG NVidia Corporation OKSORI Co., Ltd. DiAcoustics, Inc. Gulbransen, Inc. Kay Elemetrics, Inc. Crystal Semiconductor Corporation Splash Studios Quarterdeck Corporation TDK Corporation Digital Audio Labs, Inc. Seer Systems, Inc. PictureTel Corporation AT&T Microelectronics Osprey Technologies, Inc. Mediatrix Peripherals SounDesignS M.C.S. Ltd. A.L. Digital Ltd. Spectrum Signal Processing, Inc. Electronic Courseware Systems, Inc. AMD Core Dynamics CANAM Computers Softsound, Ltd. Norris Communications, Inc. Danka Data Devices EuPhonics Precept Software, Inc. Crystal Net Corporation Chromatic Research, Inc Voice Information Systems, Inc Vienna Systems Connectix Corporation Gadget Labs LLC Frontier Design Group LLC Viona Development GmbH Casio Computer Co., LTD Diamond Multimedia S3 Fraunhofer ACM_STREAMCONVERTF_BLOCKALIGN ACM_STREAMCONVERTF_START ACM_STREAMCONVERTF_END Format Enumeration Flags None ACM_FORMATENUMF_CONVERT The WAVEFORMATEX structure pointed to by the pwfx member of the ACMFORMATDETAILS structure is valid. The enumerator will only enumerate destination formats that can be converted from the given pwfx format. ACM_FORMATENUMF_HARDWARE The enumerator should only enumerate formats that are supported as native input or output formats on one or more of the installed waveform-audio devices. This flag provides a way for an application to choose only formats native to an installed waveform-audio device. This flag must be used with one or both of the ACM_FORMATENUMF_INPUT and ACM_FORMATENUMF_OUTPUT flags. Specifying both ACM_FORMATENUMF_INPUT and ACM_FORMATENUMF_OUTPUT will enumerate only formats that can be opened for input or output. This is true regardless of whether this flag is specified. ACM_FORMATENUMF_INPUT Enumerator should enumerate only formats that are supported for input (recording). ACM_FORMATENUMF_NCHANNELS The nChannels member of the WAVEFORMATEX structure pointed to by the pwfx member of the ACMFORMATDETAILS structure is valid. The enumerator will enumerate only a format that conforms to this attribute. ACM_FORMATENUMF_NSAMPLESPERSEC The nSamplesPerSec member of the WAVEFORMATEX structure pointed to by the pwfx member of the ACMFORMATDETAILS structure is valid. The enumerator will enumerate only a format that conforms to this attribute. ACM_FORMATENUMF_OUTPUT Enumerator should enumerate only formats that are supported for output (playback). ACM_FORMATENUMF_SUGGEST The WAVEFORMATEX structure pointed to by the pwfx member of the ACMFORMATDETAILS structure is valid. The enumerator will enumerate all suggested destination formats for the given pwfx format. This mechanism can be used instead of the acmFormatSuggest function to allow an application to choose the best suggested format for conversion. The dwFormatIndex member will always be set to zero on return. ACM_FORMATENUMF_WBITSPERSAMPLE The wBitsPerSample member of the WAVEFORMATEX structure pointed to by the pwfx member of the ACMFORMATDETAILS structure is valid. The enumerator will enumerate only a format that conforms to this attribute. ACM_FORMATENUMF_WFORMATTAG The wFormatTag member of the WAVEFORMATEX structure pointed to by the pwfx member of the ACMFORMATDETAILS structure is valid. The enumerator will enumerate only a format that conforms to this attribute. The dwFormatTag member of the ACMFORMATDETAILS structure must be equal to the wFormatTag member. None ACMFORMATCHOOSE_STYLEF_SHOWHELP ACMFORMATCHOOSE_STYLEF_ENABLEHOOK ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATE ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATEHANDLE ACMFORMATCHOOSE_STYLEF_INITTOWFXSTRUCT ACMFORMATCHOOSE_STYLEF_CONTEXTHELP ACMFORMATCHOOSE http://msdn.microsoft.com/en-us/library/dd742911%28VS.85%29.aspx DWORD cbStruct; DWORD fdwStyle; HWND hwndOwner; LPWAVEFORMATEX pwfx; DWORD cbwfx; LPCTSTR pszTitle; TCHAR szFormatTag[ACMFORMATTAGDETAILS_FORMATTAG_CHARS]; TCHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS]; LPTSTR pszName; n.b. can be written into DWORD cchName Should be at least 128 unless name is zero DWORD fdwEnum; LPWAVEFORMATEX pwfxEnum; HINSTANCE hInstance; LPCTSTR pszTemplateName; LPARAM lCustData; ACMFORMATCHOOSEHOOKPROC pfnHook; A track header control Required designer variable. Clean up any resources being used. true if managed resources should be disposed; otherwise, false. Required method for Designer support - do not modify the contents of this method with the code editor. Creates a new track header control Associate the control with a track Represents a Xing VBR header Load Xing Header Frame Xing Header Sees if a frame contains a Xing header Number of frames Number of bytes VBR Scale property The MP3 frame Holds information on a cue: a labeled position within a Wave file Creates a Cue based on a sample position and label Cue position in samples Label of the cue Holds a list of cues The specs for reading and writing cues from the cue and list RIFF chunks are from http://www.sonicspot.com/guide/wavefiles.html and http://www.wotsit.org/ ------------------------------ The cues are stored like this: ------------------------------ struct CuePoint { Int32 dwIdentifier; Int32 dwPosition; Int32 fccChunk; Int32 dwChunkStart; Int32 dwBlockStart; Int32 dwSampleOffset; } struct CueChunk { Int32 chunkID; Int32 chunkSize; Int32 dwCuePoints; CuePoint[] points; } ------------------------------ Labels look like this: ------------------------------ struct ListHeader { Int32 listID; /* 'list' */ Int32 chunkSize; /* includes the Type ID below */ Int32 typeID; /* 'adtl' */ } struct LabelChunk { Int32 chunkID; Int32 chunkSize; Int32 dwIdentifier; Char[] dwText; /* Encoded with extended ASCII */ } LabelChunk; Creates an empty cue list Adds an item to the list Cue Creates a cue list from the cue RIFF chunk and the list RIFF chunk The data contained in the cue chunk The data contained in the list chunk Gets the cues as the concatenated cue and list RIFF chunks. RIFF chunks containing the cue data Checks if the cue and list chunks exist and if so, creates a cue list Gets sample positions for the embedded cues Array containing the cue positions Gets labels for the embedded cues Array containing the labels Number of cues Accesses the cue at the specified index Wave Callback Strategy Use a function Create a new window (should only be done if on GUI thread) Use an existing window handle Use an event handle WaveHeader interop structure (WAVEHDR) http://msdn.microsoft.com/en-us/library/dd743837%28VS.85%29.aspx pointer to locked data buffer (lpData) length of data buffer (dwBufferLength) used for input only (dwBytesRecorded) for client's use (dwUser) assorted flags (dwFlags) loop control counter (dwLoops) PWaveHdr, reserved for driver (lpNext) reserved for driver ACM_STREAMSIZEF_SOURCE ACM_STREAMSIZEF_DESTINATION ACM_METRIC_COUNT_DRIVERS ACM_METRIC_COUNT_CODECS ACM_METRIC_COUNT_CONVERTERS ACM_METRIC_COUNT_FILTERS ACM_METRIC_COUNT_DISABLED ACM_METRIC_COUNT_HARDWARE ACM_METRIC_COUNT_LOCAL_DRIVERS ACM_METRIC_COUNT_LOCAL_CODECS ACM_METRIC_COUNT_LOCAL_CONVERTERS ACM_METRIC_COUNT_LOCAL_FILTERS ACM_METRIC_COUNT_LOCAL_DISABLED ACM_METRIC_HARDWARE_WAVE_INPUT ACM_METRIC_HARDWARE_WAVE_OUTPUT ACM_METRIC_MAX_SIZE_FORMAT ACM_METRIC_MAX_SIZE_FILTER ACM_METRIC_DRIVER_SUPPORT ACM_METRIC_DRIVER_PRIORITY ACMFORMATDETAILS http://msdn.microsoft.com/en-us/library/dd742913%28VS.85%29.aspx ACMFORMATDETAILS_FORMAT_CHARS DWORD cbStruct; DWORD dwFormatIndex; DWORD dwFormatTag; DWORD fdwSupport; LPWAVEFORMATEX pwfx; DWORD cbwfx; TCHAR szFormat[ACMFORMATDETAILS_FORMAT_CHARS]; MM Device Enumerator Enumerate Audio Endpoints Desired DataFlow State Mask Device Collection Get Default Endpoint Data Flow Role Device Get device by ID Device ID Device Creates a new MM Device Enumerator Mixer Line Flags Audio line is active. An active line indicates that a signal is probably passing through the line. Audio line is disconnected. A disconnected line's associated controls can still be modified, but the changes have no effect until the line is connected. Audio line is an audio source line associated with a single audio destination line. If this flag is not set, this line is an audio destination line associated with zero or more audio source lines. BOUNDS structure dwMinimum / lMinimum / reserved 0 dwMaximum / lMaximum / reserved 1 reserved 2 reserved 3 reserved 4 reserved 5 METRICS structure cSteps / reserved[0] cbCustomData / reserved[1], number of bytes for control details reserved 2 reserved 3 reserved 4 reserved 5 MIXERCONTROL struct http://msdn.microsoft.com/en-us/library/dd757293%28VS.85%29.aspx Reads a new time signature event from a MIDI stream The MIDI stream The data length Describes this time signature event A string describing this event Calls base class export first, then exports the data specific to this event MidiEvent.Export Hours Minutes Seconds Frames SubFrames MIDI MetaEvent Type Track sequence number Text event Copyright Sequence track name Track instrument name Lyric Marker Cue point Program (patch) name Device (port) name MIDI Channel (not official?) MIDI Port (not official?) End track Set tempo SMPTE offset Time signature Key signature Sequencer specific Holds details of a track for the trackvew Creates a new track Finds the clip at a specified time Track name Track height Volume Pan Clips contained in this track MPEG Layer flags Reserved Layer 3 Layer 2 Layer 1 Audio Endpoint Volume Step Information Step StepCount Windows Vista CoreAudio AudioClient Initialize the Audio Client Share Mode Stream Flags Buffer Duration Periodicity Wave Format Audio Session GUID (can be null) Determines whether if the specified output format is supported The share mode. The desired format. true if [is format supported] [the specified share mode]; otherwise, false. Determines if the specified output format is supported in shared mode Share Mode Desired Format Output The closest match format. true if [is format supported] [the specified share mode]; otherwise, false. Starts the audio stream Stops the audio stream. Set the Event Handle for buffer synchro. The Wait Handle to setup Resets the audio stream Reset is a control method that the client calls to reset a stopped audio stream. Resetting the stream flushes all pending data and resets the audio clock stream position to 0. This method fails if it is called on a stream that is not stopped Dispose Mix Format, Can be called before initialize Gets the buffer size (must initialize first) Gets the stream latency (must initialize first) Gets the current padding (must initialize first) Gets the default device period (can be called before initialize) Gets the minimum device period (can be called before initialize) Gets the AudioRenderClient service Gets the AudioCaptureClient service WaveStream that simply passes on data from its source stream (e.g. a MemoryStream) Initialises a new instance of RawSourceWaveStream The source stream containing raw audio The waveformat of the audio in the source stream Reads data from the stream The WaveFormat of this stream The length in bytes of this stream (if supported) The current position in this stream No nonsense mono to stereo provider, no volume adjustment, just copies input to left and right. Initializes a new instance of MonoToStereoSampleProvider Source sample provider Reads samples from this provider Sample buffer Offset into sample buffer Number of samples required Number of samples read WaveFormat of this provider Helper class for when you need to convert back to an IWaveProvider from an ISampleProvider. Keeps it as IEEE float Initializes a new instance of the WaveProviderFloatToWaveProvider class Source wave provider Reads from this provider The waveformat of this WaveProvider (same as the source) Helper function to avoid creating a new buffer every read Property Store Property Property Key Property Value IMMNotificationClient Device State Changed Device Added Device Removed Default Device Changed Property Value Changed Represents a MIDI message Creates a new MIDI message Status Data parameter 1 Data parameter 2 Creates a new MIDI message from a raw message A packed MIDI message from an MMIO function Creates a Note On message Note number Volume MIDI channel A new MidiMessage object Creates a Note Off message Note number Volume MIDI channel (1-16) A new MidiMessage object Creates a patch change message The patch number The MIDI channel number (1-16) A new MidiMessageObject Creates a Control Change message The controller number to change The value to set the controller to The MIDI channel number (1-16) A new MidiMessageObject Returns the raw MIDI message data VolumeSlider control Required designer variable. Creates a new VolumeSlider control Clean up any resources being used. Required method for Designer support - do not modify the contents of this method with the code editor. Volume changed event The volume for this control The Arranger control Required designer variable. Creates a new arranger control Clean up any resources being used. Required method for Designer support - do not modify the contents of this method with the code editor. Generator types Start address offset End address offset Start loop address offset End loop address offset Start address coarse offset Modulation LFO to pitch Vibrato LFO to pitch Modulation envelope to pitch Initial filter cutoff frequency Initial filter Q Modulation LFO to filter Cutoff frequency Modulation envelope to filter cutoff frequency End address coarse offset Modulation LFO to volume Unused Chorus effects send Reverb effects send Pan Unused Unused Unused Delay modulation LFO Frequency modulation LFO Delay vibrato LFO Frequency vibrato LFO Delay modulation envelope Attack modulation envelope Hold modulation envelope Decay modulation envelope Sustain modulation envelop Release modulation envelope Key number to modulation envelope hold Key number to modulation envelope decay Delay volume envelope Attack volume envelope Hold volume envelope Decay volume envelope Sustain volume envelope Release volume envelope Key number to volume envelope hold Key number to volume envelope decay Instrument Reserved Key range Velocity range Start loop address coarse offset Key number Velocity Initial attenuation Reserved End loop address coarse offset Coarse tune Fine tune Sample ID Sample modes Reserved Scale tuning Exclusive class Overriding root key Unused Unused implements IMediaObject (DirectX Media Object) implements IMFTransform (Media Foundation Transform) On Windows XP, it is always an MM (if present at all) Windows Media MP3 Decoder (as a DMO) WORK IN PROGRESS - DO NOT USE! Creates a new Resampler based on the DMO Resampler Dispose code - experimental at the moment Was added trying to track down why Resampler crashes NUnit This code not currently being called by ResamplerDmoStream Media Object Attempting to implement the COM IMediaBuffer interface as a .NET object Not sure what will happen when I pass this to an unmanaged object Creates a new Media Buffer Maximum length in bytes Dispose and free memory for buffer Finalizer Set length of valid data in the buffer length HRESULT Gets the maximum length of the buffer Max length (output parameter) HRESULT Gets buffer and / or length Pointer to variable into which buffer pointer should be written Pointer to variable into which valid data length should be written HRESULT Loads data into this buffer Data to load Number of bytes to load Retrieves the data in the output buffer buffer to retrieve into offset within that buffer Length of data in the media buffer Audio Meter Information Channels Metering Channel Count Get Peak value Channel index Peak value SpanDSP - a series of DSP components for telephony g722_decode.c - The ITU G.722 codec, decode part. Written by Steve Underwood <steveu@coppice.org> Copyright (C) 2005 Steve Underwood Ported to C# by Mark Heath 2011 Despite my general liking of the GPL, I place my own contributions to this code in the public domain for the benefit of all mankind - even the slimy ones who might try to proprietize my work and use it to my detriment. Based in part on a single channel G.722 codec which is: Copyright (c) CMU 1993 Computer Science, Speech Group Chengxiang Lu and Alex Hauptmann hard limits to 16 bit samples Decodes a buffer of G722 Codec state Output buffer (to contain decompressed PCM samples) Number of bytes in input G722 data to decode Number of samples written into output buffer Encodes a buffer of G722 Codec state Output buffer (to contain encoded G722) PCM 16 bit samples to encode Number of samples in the input buffer to encode Number of encoded bytes written into output buffer Stores state to be used between calls to Encode or Decode Creates a new instance of G722 Codec State for a new encode or decode session Bitrate (typically 64000) Special options ITU Test Mode TRUE if the operating in the special ITU test mode, with the band split filters disabled. TRUE if the G.722 data is packed 8kHz Sampling TRUE if encode from 8k samples/second Bits Per Sample 6 for 48000kbps, 7 for 56000kbps, or 8 for 64000kbps. Signal history for the QMF (x) Band In bit buffer Number of bits in InBuffer Out bit buffer Number of bits in OutBuffer Band data for G722 Codec s sp sz r a ap p d b bp sg nb det G722 Flags None Using a G722 sample rate of 8000 Packed WaveStream that can mix together multiple 32 bit input streams (Normally used with stereo input channels) All channels must have the same number of inputs Creates a new 32 bit WaveMixerStream Add a new input to the mixer The wave input to add Remove a WaveStream from the mixer waveStream to remove Creates a new 32 bit WaveMixerStream An Array of WaveStreams - must all have the same format. Use WaveChannel is designed for this purpose. Automatically stop when all inputs have been read Thrown if the input streams are not 32 bit floating point, or if they have different formats to each other Reads bytes from this wave stream buffer to read into offset into buffer number of bytes required Number of bytes read. Thrown if an invalid number of bytes requested Actually performs the mixing Disposes this WaveStream The number of inputs to this mixer Automatically stop when all inputs have been read Length of this Wave Stream (in bytes) Position within this Wave Stream (in bytes) A simple compressor Create a new simple compressor stream Source stream Determine whether the stream has the required amount of data. Number of bytes of data required from the stream. Flag indicating whether the required amount of data is avialable. Reads bytes from this stream Buffer to read into Offset in array to read into Number of bytes to read Number of bytes read Disposes this stream true if the user called this Make-up Gain Threshold Ratio Attack time Release time Turns gain on or off Returns the stream length Gets or sets the current position in the stream Gets the WaveFormat of this stream Gets the block alignment for this stream Wave Stream for converting between sample rates WaveStream to resample using the DMO Resampler Input Stream Desired Output Format Reads data from input stream buffer offset into buffer Bytes required Number of bytes read Dispose True if disposing (not from finalizer) Stream Wave Format Stream length in bytes Stream position in bytes Base class for creating a 32 bit floating point wave provider Can also be used as a base class for an ISampleProvider that can be plugged straight into anything requiring an IWaveProvider Initializes a new instance of the WaveProvider32 class defaulting to 44.1kHz mono Initializes a new instance of the WaveProvider32 class with the specified sample rate and number of channels Allows you to specify the sample rate and channels for this WaveProvider (should be initialised before you pass it to a wave player) Implements the Read method of IWaveProvider by delegating to the abstract Read method taking a float array Method to override in derived classes Supply the requested number of samples into the buffer The Wave Format Main ASIODriver Class. To use this class, you need to query first the GetASIODriverNames() and then use the GetASIODriverByName to instantiate the correct ASIODriver. This is the first ASIODriver binding fully implemented in C#! Contributor: Alexandre Mutel - email: alexandre_mutel at yahoo.fr Gets the ASIO driver names installed. a list of driver names. Use this name to GetASIODriverByName Instantiate a ASIODriver given its name. The name of the driver an ASIODriver instance Instantiate the ASIO driver by GUID. The GUID. an ASIODriver instance Inits the ASIODriver.. The sys handle. Gets the name of the driver. Gets the driver version. Gets the error message. Starts this instance. Stops this instance. Gets the channels. The num input channels. The num output channels. Gets the latencies. The input latency. The output latency. Gets the size of the buffer. Size of the min. Size of the max. Size of the preferred. The granularity. Determines whether this instance can use the specified sample rate. The sample rate. true if this instance [can sample rate] the specified sample rate; otherwise, false. Gets the sample rate. Sets the sample rate. The sample rate. Gets the clock sources. The clocks. The num sources. Sets the clock source. The reference. Gets the sample position. The sample pos. The time stamp. Gets the channel info. The channel number. if set to true [true for input info]. Creates the buffers. The buffer infos. The num channels. Size of the buffer. The callbacks. Disposes the buffers. Controls the panel. Futures the specified selector. The selector. The opt. Notifies OutputReady to the ASIODriver. Releases this instance. Handles the exception. Throws an exception based on the error. The error to check. Method name Inits the vTable method from GUID. This is a tricky part of this class. The ASIO GUID. Internal VTable structure to store all the delegates to the C++ COM method. The EDataFlow enumeration defines constants that indicate the direction in which audio data flows between an audio endpoint device and an application Audio rendering stream. Audio data flows from the application to the audio endpoint device, which renders the stream. Audio capture stream. Audio data flows from the audio endpoint device that captures the stream, to the application Audio rendering or capture stream. Audio data can flow either from the application to the audio endpoint device, or from the audio endpoint device to the application. Represents a MIDI patch change event Gets the default MIDI instrument names Reads a new patch change event from a MIDI stream Binary reader for the MIDI stream Creates a new patch change event Time of the event Channel number Patch number Describes this patch change event String describing the patch change event Gets as a short message for sending with the midiOutShortMsg API short message Calls base class export first, then exports the data specific to this event MidiEvent.Export The Patch Number Represents a MIDI note on event Represents a note MIDI event Reads a NoteEvent from a stream of MIDI data Binary Reader for the stream Creates a MIDI Note Event with specified parameters Absolute time of this event MIDI channel number MIDI command code MIDI Note Number MIDI Note Velocity Describes the Note Event Note event as a string The MIDI note number The note velocity The note name Reads a new Note On event from a stream of MIDI data Binary reader on the MIDI data stream Creates a NoteOn event with specified parameters Absolute time of this event MIDI channel number MIDI note number MIDI note velocity MIDI note duration Calls base class export first, then exports the data specific to this event MidiEvent.Export The associated Note off event Get or set the Note Number, updating the off event at the same time Get or set the channel, updating the off event at the same time The duration of this note There must be a note off event SoundFont sample modes No loop Loop Continuously Reserved no loop Loop and continue A SoundFont Preset Preset name Patch Number Bank number Zones MP3 Frame Decompressor using ACM Creates a new ACM frame decompressor The MP3 source format Decompresses a frame The MP3 frame destination buffer Offset within destination buffer Bytes written into destination buffer Disposes of this MP3 frame decompressor Output format (PCM) mu-law encoder based on code from: http://hazelware.luggle.com/tutorials/mulawcompression.html Encodes a single 16 bit sample to mu-law 16 bit PCM sample mu-law encoded byte DMO Output Data Buffer Flags None DMO_OUTPUT_DATA_BUFFERF_SYNCPOINT DMO_OUTPUT_DATA_BUFFERF_TIME DMO_OUTPUT_DATA_BUFFERF_TIMELENGTH DMO_OUTPUT_DATA_BUFFERF_INCOMPLETE Represents Channel for the WaveMixerStream 32 bit output and 16 bit input It's output is always stereo The input stream can be panned Creates a new WaveChannel32 the source stream stream volume (1 is 0dB) pan control (-1 to 1) Creates a WaveChannel32 with default settings The source stream Reads bytes from this wave stream The destination buffer Offset into the destination buffer Number of bytes read Number of bytes read. Determines whether this channel has any data to play to allow optimisation to not read, but bump position forward Disposes this WaveStream Raise the sample event (no check for null because it has already been done) Gets the block alignment for this WaveStream Returns the stream length Gets or sets the current position in the stream If true, Read always returns the number of bytes requested Volume of this channel. 1.0 = full scale Pan of this channel (from -1 to 1) Sample AudioFileReader simplifies opening an audio file in NAudio Simply pass in the filename, and it will attempt to open the file and set up a conversion path that turns into PCM IEEE float. ACM codecs will be used for conversion. It provides a volume property and implements both WaveStream and ISampleProvider, making it possibly the only stage in your audio pipeline necessary for simple playback scenarios Initializes a new instance of AudioFileReader The file to open Creates the reader stream, supporting all filetypes in the core NAudio library, and ensuring we are in PCM format File Name Reads from this wave stream Audio buffer Offset into buffer Number of bytes required Number of bytes read Reads audio from this sample provider Sample buffer Offset into sample buffer Number of samples required Number of samples read Helper to convert source to dest bytes Helper to convert dest to source bytes Disposes this AudioFileReader True if called from Dispose WaveFormat of this stream Length of this stream (in bytes) Position of this stream (in bytes) Gets or Sets the Volume of this AudioFileReader. 1.0f is full volume A read-only stream of AIFF data based on an aiff file with an associated WaveFormat originally contributed to NAudio by Giawa Supports opening a AIF file The AIF is of similar nastiness to the WAV format. This supports basic reading of uncompressed PCM AIF files, with 16, 24 and 32 bit PCM data. Creates an Aiff File Reader based on an input stream The input stream containing a AIF file including header Ensures valid AIFF header and then finds data offset. The stream, positioned at the start of audio data The format found The position of the data chunk The length of the data chunk Additional chunks found Cleans up the resources associated with this AiffFileReader Reads bytes from the AIFF File Number of Samples (if possible to calculate) Position in the AIFF file AIFF Chunk Chunk Name Chunk Length Chunk start Creates a new AIFF Chunk Very simple sample provider supporting adjustable gain Initializes a new instance of VolumeSampleProvider Source Sample Provider Reads samples from this sample provider Sample buffer Offset into sample buffer Number of samples desired Number of samples read WaveFormat Allows adjusting the volume, 1.0f = full volume GSM 610 Creates a GSM 610 WaveFormat For now hardcoded to 13kbps Writes this structure to a BinaryWriter Samples per block Helper function to avoid creating a new buffer every read Windows multimedia error codes from mmsystem.h. no error, MMSYSERR_NOERROR unspecified error, MMSYSERR_ERROR device ID out of range, MMSYSERR_BADDEVICEID driver failed enable, MMSYSERR_NOTENABLED device already allocated, MMSYSERR_ALLOCATED device handle is invalid, MMSYSERR_INVALHANDLE no device driver present, MMSYSERR_NODRIVER memory allocation error, MMSYSERR_NOMEM function isn't supported, MMSYSERR_NOTSUPPORTED error value out of range, MMSYSERR_BADERRNUM invalid flag passed, MMSYSERR_INVALFLAG invalid parameter passed, MMSYSERR_INVALPARAM handle being used simultaneously on another thread (eg callback),MMSYSERR_HANDLEBUSY specified alias not found, MMSYSERR_INVALIDALIAS bad registry database, MMSYSERR_BADDB registry key not found, MMSYSERR_KEYNOTFOUND registry read error, MMSYSERR_READERROR registry write error, MMSYSERR_WRITEERROR registry delete error, MMSYSERR_DELETEERROR registry value not found, MMSYSERR_VALNOTFOUND driver does not call DriverCallback, MMSYSERR_NODRIVERCB more data to be returned, MMSYSERR_MOREDATA unsupported wave format, WAVERR_BADFORMAT still something playing, WAVERR_STILLPLAYING header not prepared, WAVERR_UNPREPARED device is synchronous, WAVERR_SYNC Conversion not possible (ACMERR_NOTPOSSIBLE) Busy (ACMERR_BUSY) Header Unprepared (ACMERR_UNPREPARED) Cancelled (ACMERR_CANCELED) invalid line (MIXERR_INVALLINE) invalid control (MIXERR_INVALCONTROL) invalid value (MIXERR_INVALVALUE) ACMSTREAMHEADER_STATUSF_DONE ACMSTREAMHEADER_STATUSF_PREPARED ACMSTREAMHEADER_STATUSF_INQUEUE ACM Format Tag Format Tag Index Format Tag Format Size Support Flags Standard Formats Count Format Description Represents an installed ACM Driver Helper function to determine whether a particular codec is installed The short name of the function Whether the codec is installed Show Format Choose Dialog Owner window handle, can be null Window title Enumeration flags. None to get everything Enumeration format. Only needed with certain enumeration flags The selected format Textual description of the selected format Textual description of the selected format tag True if a format was selected Finds a Driver by its short name Short Name The driver, or null if not found Gets a list of the ACM Drivers installed The callback for acmDriverEnum Creates a new ACM Driver object Driver handle ToString Gets all the supported formats for a given format tag Format tag Supported formats Opens this driver Closes this driver Dispose Gets the maximum size needed to store a WaveFormat for ACM interop functions The short name of this driver The full name of this driver The driver ID The list of FormatTags for this ACM Driver defined in MMDeviceAPI.h Audio Meter Information Peak Values Hardware Support Master Peak Value Pass-through stream that ignores Dispose Useful for dealing with MemoryStreams that you want to re-use Creates a new IgnoreDisposeStream The source stream Flushes the underlying stream Reads from the underlying stream Seeks on the underlying stream Sets the length of the underlying stream Writes to the underlying stream Dispose - by default (IgnoreDispose = true) will do nothing, leaving the underlying stream undisposed The source stream all other methods fall through to If true the Dispose will be ignored, if false, will pass through to the SourceStream Set to true by default Can Read Can Seek Can write to the underlying stream Gets the length of the underlying stream Gets or sets the position of the underlying stream Represents a MIDI text event Reads a new text event from a MIDI stream The MIDI stream The data length Creates a new TextEvent The text in this type MetaEvent type (must be one that is associated with text data) Absolute time of this event Describes this MIDI text event A string describing this event Calls base class export first, then exports the data specific to this event MidiEvent.Export The contents of this text event Represents a MIDI pitch wheel change event Reads a pitch wheel change event from a MIDI stream The MIDI stream to read from Creates a new pitch wheel change event Absolute event time Channel Pitch wheel value Describes this pitch wheel change event String describing this pitch wheel change event Gets a short message Integer to sent as short message Calls base class export first, then exports the data specific to this event MidiEvent.Export Pitch Wheel Value 0 is minimum, 0x2000 (8192) is default, 0x4000 (16384) is maximum Represents a MIDI in device Opens a specified MIDI in device The device number Closes this MIDI in device Closes this MIDI in device Start the MIDI in device Stop the MIDI in device Reset the MIDI in device Gets the MIDI in device info Closes the MIDI out device True if called from Dispose Cleanup Called when a MIDI message is received An invalid MIDI message Gets the number of MIDI input devices available in the system MIDI In Message Information Create a new MIDI In Message EventArgs The Raw message received from the MIDI In API The raw message interpreted as a MidiEvent The timestamp in milliseconds for this message Pan slider control Required designer variable. Creates a new PanSlider control Clean up any resources being used. Required method for Designer support - do not modify the contents of this method with the code editor. True when pan value changed The current Pan setting just reads a chunk ID at the current position chunk ID reads a chunk at the current position creates a new riffchunk from current position checking that we're not at the end of this chunk first the new chunk useful for chunks that just contain a string chunk as string A soundfont info chunk SoundFont Version WaveTable sound engine Bank name Data ROM Creation Date Author Target Product Copyright Comments Tools ROM Version MPEG Version Flags Version 2.5 Reserved Version 2 Version 1 defined in Medparam.h Audio Volume Notification Data Audio Volume Notification Data Event Context Muted Master Volume Channels Channel Volume AUDCLNT_STREAMFLAGS None AUDCLNT_STREAMFLAGS_CROSSPROCESS AUDCLNT_STREAMFLAGS_LOOPBACK AUDCLNT_STREAMFLAGS_EVENTCALLBACK AUDCLNT_STREAMFLAGS_NOPERSIST Audio Client Buffer Flags None AUDCLNT_BUFFERFLAGS_DATA_DISCONTINUITY AUDCLNT_BUFFERFLAGS_SILENT AUDCLNT_BUFFERFLAGS_TIMESTAMP_ERROR defined in mediaobj.h A buffer of Wave samples creates a new wavebuffer WaveIn device to write to Buffer size in bytes Place this buffer back to record more audio Finalizer for this wave buffer Releases resources held by this WaveBuffer Releases resources held by this WaveBuffer Provides access to the actual record buffer (for reading only) Indicates whether the Done flag is set on this buffer Number of bytes recorded The buffer size in bytes A wave file reader supporting cue reading Loads a wavefile and supports reading cues Cue List (can be null if cues not present) Represents a wave out device Retrieves the capabilities of a waveOut device Device to test The WaveOut device capabilities Opens a WaveOut device This is the device number to open. This must be between 0 and DeviceCount - 1. The number of milliseconds of audio to read before streaming to the audio device. This will be broken into 3 buffers Initialises the WaveOut device Wave provider to play Start playing the audio from the WaveProvider Pause the audio Resume playing after a pause from the same position Stop and reset the WaveOut device Closes this WaveOut device Closes the WaveOut device and disposes of buffers True if called from Dispose Finalizer. Only called when user forgets to call Dispose Playback stopped Returns the number of Wave Out devices available in the system Playback State Volume for this device 1.0 is full scale NativeDirectSoundOut using DirectSound COM interop. Contact author: Alexandre Mutel - alexandre_mutel at yahoo.fr Modified by: Graham "Gee" Plumb Initializes a new instance of the class. Initializes a new instance of the class. Initializes a new instance of the class. Initializes a new instance of the class. (40ms seems to work under Vista). The latency. Selected device Releases unmanaged resources and performs other cleanup operations before the is reclaimed by garbage collection. Begin playback Stop playback Pause Playback Initialise playback The waveprovider to be played Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Determines whether the SecondaryBuffer is lost. true if [is buffer lost]; otherwise, false. Convert ms to bytes size according to WaveFormat The ms number of byttes Processes the samples in a separate thread. Stop playback Feeds the SecondaryBuffer with the WaveStream number of bytes to feed Instanciate DirectSound from the DLL The GUID. The direct sound. The p unk outer. DirectSound default playback device GUID DirectSound default capture device GUID DirectSound default device for voice playback DirectSound default device for voice capture The DirectSoundEnumerate function enumerates the DirectSound drivers installed in the system. callback function User context Gets the HANDLE of the desktop window. HANDLE of the Desktop window Playback Stopped Gets the DirectSound output devices in the system Current playback state The volume 1.0 is full scale IDirectSound interface IDirectSoundBuffer interface IDirectSoundNotify interface The DSEnumCallback function is an application-defined callback function that enumerates the DirectSound drivers. The system calls this function in response to the application's call to the DirectSoundEnumerate or DirectSoundCaptureEnumerate function. Address of the GUID that identifies the device being enumerated, or NULL for the primary device. This value can be passed to the DirectSoundCreate8 or DirectSoundCaptureCreate8 function to create a device object for that driver. Address of a null-terminated string that provides a textual description of the DirectSound device. Address of a null-terminated string that specifies the module name of the DirectSound driver corresponding to this device. Address of application-defined data. This is the pointer passed to DirectSoundEnumerate or DirectSoundCaptureEnumerate as the lpContext parameter. Returns TRUE to continue enumerating drivers, or FALSE to stop. Class for enumerating DirectSound devices The device identifier Device description Device module name ASIO Out Player. New implementation using an internal C# binding. This implementation is only supporting Short16Bit and Float32Bit formats and is optimized for 2 outputs channels . SampleRate is supported only if ASIODriver is supporting it (TODO: Add a resampler otherwhise). This implementation is probably the first ASIODriver binding fully implemented in C#! Original Contributor: Mark Heath New Contributor to C# binding : Alexandre Mutel - email: alexandre_mutel at yahoo.fr Initializes a new instance of the class with the first available ASIO Driver. Initializes a new instance of the class with the driver name. Name of the device. Opens an ASIO output device Device number (zero based) Releases unmanaged resources and performs other cleanup operations before the is reclaimed by garbage collection. Dispose Gets the names of the installed ASIO Driver. an array of driver names Determines whether ASIO is supported. true if ASIO is supported; otherwise, false. Inits the driver from the asio driver name. Name of the driver. Shows the control panel Starts playback Stops playback Pauses playback Initialises to play Source wave provider driver buffer update callback to fill the wave buffer. The buffer channels. Playback Stopped Playback State Driver Name By default the first channel on the input WaveProvider is sent to the first ASIO output. This option sends it to the specified channel number. Warning: make sure you don't set it higher than the number of available output channels - the number of source channels. n.b. Future NAudio may modify this Sets the volume (1.0 is unity gain) Not supported for ASIO Out. Set the volume on the input stream instead Custom marshaller for WaveFormat structures Gets the instance of this marshaller Clean up managed data Clean up native data Get native data size Marshal managed to native Marshal Native to Managed Helper function to avoid creating a new buffer every read Flags indicating what features this WaveOut device supports supports pitch control (WAVECAPS_PITCH) supports playback rate control (WAVECAPS_PLAYBACKRATE) supports volume control (WAVECAPS_VOLUME) supports separate left-right volume control (WAVECAPS_LRVOLUME) (WAVECAPS_SYNC) (WAVECAPS_SAMPLEACCURATE) Event Args for WaveInStream event Creates new WaveInEventArgs Buffer containing recorded data. Note that it might not be completely full. The number of recorded bytes in Buffer. ASIO common Exception. Gets the name of the error. The error. the name of the error MMDevice STGM enumeration is defined in WTypes.h Boolean mixer control Gets the details for this control memory pointer The current value of the control Represents a MIDI track sequence number event event Reads a new track sequence number event from a MIDI stream The MIDI stream the data length Describes this event String describing the event Calls base class export first, then exports the data specific to this event MidiEvent.Export Represents a MIDI tempo event Reads a new tempo event from a MIDI stream The MIDI stream the data length Creates a new tempo event with specified settings Microseconds per quarter note Absolute time Describes this tempo event String describing the tempo event Calls base class export first, then exports the data specific to this event MidiEvent.Export Microseconds per quarter note Tempo Represents a MIDI control change event Reads a control change event from a MIDI stream Binary reader on the MIDI stream Creates a control change event Time MIDI Channel Number The MIDI Controller Controller value Describes this control change event A string describing this event Calls base class export first, then exports the data specific to this event MidiEvent.Export The controller number The controller value Control for viewing waveforms Required designer variable. Creates a new WaveViewer control Clean up any resources being used. Required method for Designer support - do not modify the contents of this method with the code editor. sets the associated wavestream The zoom level, in samples per pixel Start position (currently in bytes) A SoundFont zone Modulators for this Zone Generators for this Zone Builds a SoundFont version Reads a SoundFont Version structure Writes a SoundFont Version structure Gets the length of this structure Represents an entry in a Cakewalk drum map Describes this drum map entry User customisable note name Input MIDI note number Output MIDI note number Output port Output MIDI Channel Velocity adjustment Velocity scaling - in percent Windows Media Resampler Props wmcodecdsp.h Range is 1 to 60 Takes a stereo 16 bit input and turns it mono, allowing you to select left or right channel only or mix them together Creates a new mono waveprovider based on a stereo input Stereo 16 bit PCM input Reads bytes from this WaveProvider 1.0 to mix the mono source entirely to the left channel 1.0 to mix the mono source entirely to the right channel Output Wave Format This class used for marshalling from unmanaged code parameterless constructor for marshalling Reads this structure from a BinaryReader Writes this structure to a BinaryWriter Allows the extra data to be read AcmStream encapsulates an Audio Compression Manager Stream used to convert audio from one format to another Creates a new ACM stream to convert one format to another. Note that not all conversions can be done in one step The source audio format The destination audio format Creates a new ACM stream to convert one format to another, using a specified driver identified and wave filter the driver identifier the source format the wave filter Returns the number of output bytes for a given number of input bytes Number of input bytes Number of output bytes Returns the number of source bytes for a given number of destination bytes Number of destination bytes Number of source bytes Suggests an appropriate PCM format that the compressed format can be converted to in one step The compressed format The PCM format Converts the contents of the SourceBuffer into the DestinationBuffer The number of bytes in the SourceBuffer that need to be converted The number of source bytes actually converted The number of converted bytes in the DestinationBuffer Converts the contents of the SourceBuffer into the DestinationBuffer The number of bytes in the SourceBuffer that need to be converted The number of converted bytes in the DestinationBuffer Frees resources associated with this ACM Stream Frees resources associated with this ACM Stream Frees resources associated with this ACM Stream Returns the Source Buffer. Fill this with data prior to calling convert Returns the Destination buffer. This will contain the converted data after a successful call to Convert ACM Format Format Index Format Tag Support Flags WaveFormat WaveFormat Size Format Description The ERole enumeration defines constants that indicate the role that the system has assigned to an audio endpoint device Games, system notification sounds, and voice commands. Music, movies, narration, and live music recording Voice communications (talking to another person). implements IMMDeviceEnumerator In-place and stable implementation of MergeSort MergeSort a list of comparable items MergeSort a list Represents a Windows mixer device Connects to the specified mixer The index of the mixer to use. This should be between zero and NumberOfDevices - 1 Retrieve the specified MixerDestination object The ID of the destination to use. Should be between 0 and DestinationCount - 1 The number of mixer devices available The number of destinations this mixer supports The name of this mixer device The manufacturer code for this mixer device The product identifier code for this mixer device A way to enumerate the destinations A way to enumerate all available devices Audio Clip Creates a new Audio Clip Source File Name Type to represent complex number Real Part Imaginary Part Property Keys PKEY_DeviceInterface_FriendlyName PKEY_AudioEndpoint_FormFactor PKEY_AudioEndpoint_ControlPanelPageProvider PKEY_AudioEndpoint_Association PKEY_AudioEndpoint_PhysicalSpeakers PKEY_AudioEndpoint_GUID PKEY_AudioEndpoint_Disable_SysFx PKEY_AudioEndpoint_FullRangeSpeakers PKEY_AudioEngine_DeviceFormat PKEY _Devie_FriendlyName DMO Process Output Flags None DMO_PROCESS_OUTPUT_DISCARD_WHEN_NO_BUFFER WaveStream that converts 32 bit audio back down to 16 bit, clipping if necessary Creates a new Wave32To16Stream the source stream Reads bytes from this wave stream Destination buffer Offset into destination buffer Number of bytes read. Conversion to 16 bit and clipping Disposes this WaveStream Sets the volume for this stream. 1.0f is full scale Returns the stream length Gets or sets the current position in the stream Clip indicator. Can be reset. Summary description for WaveFormatEncoding. WAVE_FORMAT_UNKNOWN, Microsoft Corporation WAVE_FORMAT_PCM Microsoft Corporation WAVE_FORMAT_ADPCM Microsoft Corporation WAVE_FORMAT_IEEE_FLOAT Microsoft Corporation WAVE_FORMAT_VSELP Compaq Computer Corp. WAVE_FORMAT_IBM_CVSD IBM Corporation WAVE_FORMAT_ALAW Microsoft Corporation WAVE_FORMAT_MULAW Microsoft Corporation WAVE_FORMAT_DTS Microsoft Corporation WAVE_FORMAT_DRM Microsoft Corporation WAVE_FORMAT_OKI_ADPCM OKI WAVE_FORMAT_DVI_ADPCM Intel Corporation WAVE_FORMAT_IMA_ADPCM Intel Corporation WAVE_FORMAT_MEDIASPACE_ADPCM Videologic WAVE_FORMAT_SIERRA_ADPCM Sierra Semiconductor Corp WAVE_FORMAT_G723_ADPCM Antex Electronics Corporation WAVE_FORMAT_DIGISTD DSP Solutions, Inc. WAVE_FORMAT_DIGIFIX DSP Solutions, Inc. WAVE_FORMAT_DIALOGIC_OKI_ADPCM Dialogic Corporation WAVE_FORMAT_MEDIAVISION_ADPCM Media Vision, Inc. WAVE_FORMAT_CU_CODEC Hewlett-Packard Company WAVE_FORMAT_YAMAHA_ADPCM Yamaha Corporation of America WAVE_FORMAT_SONARC Speech Compression WAVE_FORMAT_DSPGROUP_TRUESPEECH DSP Group, Inc WAVE_FORMAT_ECHOSC1 Echo Speech Corporation WAVE_FORMAT_AUDIOFILE_AF36, Virtual Music, Inc. WAVE_FORMAT_APTX Audio Processing Technology WAVE_FORMAT_AUDIOFILE_AF10, Virtual Music, Inc. WAVE_FORMAT_PROSODY_1612, Aculab plc WAVE_FORMAT_LRC, Merging Technologies S.A. WAVE_FORMAT_DOLBY_AC2, Dolby Laboratories WAVE_FORMAT_GSM610, Microsoft Corporation WAVE_FORMAT_MSNAUDIO, Microsoft Corporation WAVE_FORMAT_ANTEX_ADPCME, Antex Electronics Corporation WAVE_FORMAT_CONTROL_RES_VQLPC, Control Resources Limited WAVE_FORMAT_DIGIREAL, DSP Solutions, Inc. WAVE_FORMAT_DIGIADPCM, DSP Solutions, Inc. WAVE_FORMAT_CONTROL_RES_CR10, Control Resources Limited WAVE_FORMAT_GSM WAVE_FORMAT_G729 WAVE_FORMAT_G723 WAVE_FORMAT_ACELP WAVE_FORMAT_WMAUDIO2, Microsoft Corporation WAVE_FORMAT_WMAUDIO3, Microsoft Corporation WAVE_FORMAT_EXTENSIBLE WAVE_FORMAT_VORBIS1 "Og" Original stream compatible WAVE_FORMAT_VORBIS2 "Pg" Have independent header WAVE_FORMAT_VORBIS3 "Qg" Have no codebook header WAVE_FORMAT_VORBIS1P "og" Original stream compatible WAVE_FORMAT_VORBIS2P "pg" Have independent headere WAVE_FORMAT_VORBIS3P "qg" Have no codebook header Helper function to avoid creating a new buffer every read Summary description for MmException. Creates a new MmException The result returned by the Windows API call The name of the Windows API that failed Helper function to automatically raise an exception on failure The result of the API call The API function name Returns the Windows API result This class stores convertors for different interleaved WaveFormat to ASIOSampleType separate channel format. Selects the sample convertor based on the input WaveFormat and the output ASIOSampleTtype. The wave format. The type. Optimized convertor for 2 channels SHORT Generic convertor for SHORT Optimized convertor for 2 channels FLOAT Generic convertor SHORT Optimized convertor for 2 channels SHORT Generic convertor for SHORT Optimized convertor for 2 channels FLOAT Generic convertor SHORT Generic converter 24 LSB Generic convertor for float from Propidl.h. http://msdn.microsoft.com/en-us/library/aa380072(VS.85).aspx contains a union so we have to do an explicit layout Helper method to gets blob data Property value Device State DEVICE_STATE_ACTIVE DEVICE_STATE_DISABLED DEVICE_STATE_NOTPRESENT DEVICE_STATE_UNPLUGGED DEVICE_STATEMASK_ALL Progress Event Arguments New progress event arguments The message type The message New progress event arguments The message type the message format string format arguments The message The message type Progress Message Type Trace Information Warning Error HResult S_OK S_FALSE E_INVALIDARG (from winerror.h) MAKE_HRESULT macro A util class for conversions linear to dB conversion linear value decibel value dB to linear conversion decibel value linear value Represents a signed mixer control Gets details for this contrl String Representation for debugging purposes The value of the control Minimum value for this control Maximum value for this control Value of the control represented as a percentage A SoundFont Sample Header The sample name Start offset End offset Start loop point End loop point Sample Rate Original pitch Pitch correction Sample Link SoundFont Sample Link Type Audio Capture using Wasapi See http://msdn.microsoft.com/en-us/library/dd370800%28VS.85%29.aspx Initialises a new instance of the WASAPI capture class Initialises a new instance of the WASAPI capture class Capture device to use Gets the default audio capture device The default audio capture device Start Recording Stop Recording Dispose Indicates recorded data is available Indicates that all recorded data has now been received. Recording wave format A-law encoder Encodes a single 16 bit sample to a-law 16 bit PCM sample a-law encoded byte