Un4seen.Bass.MiscBaseEncoder
Un4seen.Bass.MiscEncoderAIFF
Namespace: Un4seen.Bass.Misc
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
The EncoderAIFF type exposes the following members.
Name | Description | |
---|---|---|
EncoderAIFF |
Creates an instance of a Audio Interchange File Format (AIFF) implementation.
|
Name | Description | |
---|---|---|
AIFF_BitsPerSample |
Gets or Sets the target resolution (number of bits per sample) of the AIFF file to create -
(by default the original resolution will be used).
| |
AIFF_Use32BitInteger |
Gets or Sets, if 32bit integer (instead of 32bit IEEE float) should be used when setting AIFF_BitsPerSample to 32 (default is )?
| |
ChannelBitwidth |
This property returns the actual bitwidth of the sample data of the channel (e.g. 8, 16, 32).
(Inherited from BaseEncoder.) | |
ChannelHandle |
Gets or Sets the channel handle which is used to create the broadcast encoder class.
(Inherited from BaseEncoder.) | |
ChannelInfo |
Returns the general channel info.
(Inherited from BaseEncoder.) | |
ChannelNumChans |
This property returns the actual number of channles of the sample data BASS is using with the channel (e.g. 1=mono, 2=stereo, etc.).
(Inherited from BaseEncoder.) | |
ChannelSampleRate |
This property returns the actual sample rate in Hz of the sample data BASS is using with the channel (e.g. 44100).
(Inherited from BaseEncoder.) | |
DefaultOutputExtension |
This return the default extension of an output file for this encoder (e.g. ".aif"). Here the AIFF_DefaultOutputExtension value is returned.
(Overrides BaseEncoderDefaultOutputExtension.) | |
EffectiveBitrate |
Returns the effective encoder bitrate (in kbps) of the output.
(Overrides BaseEncoderEffectiveBitrate.) | |
EncoderCommandLine |
Returns the OutputFile, since WAV does not use any command-line tool.
(Overrides BaseEncoderEncoderCommandLine.) | |
EncoderDirectory |
Gets or Sets the encoder's base directory.
(Inherited from BaseEncoder.) | |
EncoderExists |
This property should return , if the encoder exists and is available - else should be returned.
(Inherited from BaseEncoder.) | |
EncoderHandle |
Gets or sets the current HENCODE encoder handle.
(Inherited from BaseEncoder.) | |
EncoderType |
Gets a value indicating the type of content. Here the AIFF_EncoderType value is returned.
(Overrides BaseEncoderEncoderType.) | |
Force16Bit |
Always returns false, since this encoder doesn't supports this flag. The target format can be set via the AIFF_BitsPerSample property.
| |
InputFile |
Gets or Sets the input file name to be processed by the encoder (null = STDIN, default).
(Inherited from BaseEncoder.) | |
IsActive |
Gets a value indicating if the encoder has been started (see Start(ENCODEPROC, IntPtr, Boolean)) and is active - else will be returned.
(Inherited from BaseEncoder.) | |
IsPaused |
Gets a value indicating if the encoder has been paused (see Pause(Boolean)) - else must be returned.
(Inherited from BaseEncoder.) | |
IsStreaming |
Is this instance used for streaming? When set to true, some internal encoder options might be set.
Default is false.
(Inherited from BaseEncoder.) | |
NoLimit |
Gets or Sets if encoding should use the CAST_NOLIMIT flag (which is only needed, if the encoder is used for streaming).
(Inherited from BaseEncoder.) | |
OutputFile |
Gets or Sets the output file name to be processed by the encoder (null = STDOUT, default).
(Inherited from BaseEncoder.) | |
SupportsSTDOUT |
AIFF does not implement STDOUT, so is always returned.
(Overrides BaseEncoderSupportsSTDOUT.) | |
TAGs |
Gets or Sets the TAG_INFO structure associated with the encoder.
(Inherited from BaseEncoder.) | |
UseAsyncQueue |
Gets or Sets if encoding should use an async queue (i.e. the BASS_ENCODE_QUEUE flag).
(Inherited from BaseEncoder.) |
Name | Description | |
---|---|---|
Dispose |
Implement IDisposable.
(Inherited from BaseEncoder.) | |
Finalize |
Finalization code.
(Inherited from BaseEncoder.) | |
Pause |
Pauses or resumes an encoder.
(Inherited from BaseEncoder.) | |
SettingsString |
Returns the string representation of the current encoder settings.
(Overrides BaseEncoderSettingsString.) | |
Start |
This method starts the actual AIFF encoder.
(Overrides BaseEncoderStart(ENCODEPROC, IntPtr, Boolean).) | |
Stop |
Stops the encoder immediately (if started).
(Inherited from BaseEncoder.) | |
Stop(Boolean) |
Stops the encoder (if started).
(Inherited from BaseEncoder.) | |
ToString |
Returns the name of the Encoder.
(Overrides ObjectToString.) |
Name | Description | |
---|---|---|
AIFF_DefaultOutputExtension |
Gets or Sets the default output extension to be used by the encoder (e.g. ".aif").
| |
AIFF_EncoderType |
Gets or Sets the BASSChannelType which will be supported by the encoder.
|
This format supports 8-, 16- and 32-bit(IEEE float) sample data as input.
Make sure to set the AIFF_xxx flags before calling Start(ENCODEPROC, IntPtr, Boolean).
TAG writing is not supported.
This implementation uses the automatic DSP system for encoding. Meaning the sending of sample data to the encoder is done automatically when you play the channel (BASS_ChannelPlay(Int32, Boolean)) or call BASS_ChannelGetData(Int32, IntPtr, Int32) (if it's a decoding channel). So there is no need to call BASS_Encode_Write(Int32, IntPtr, Int32) manually!
If you simply want to encode a physical file please also take a look to the EncodeFile(String, String, BaseEncoder, BaseEncoderENCODEFILEPROC, Boolean, Boolean).
int stream = Bass.BASS_StreamCreateFile("test.mp3", 0, 0, BASSFlag.BASS_STREAM_DECODE | BASSFlag.BASS_SAMPLE_FLOAT); EncoderAIFF a = new EncoderAIFF(stream); a.InputFile = null; a.OutputFile = "test.aif"; // will be a 32-bit IEEE float file, since the stream is float a.Start(null, IntPtr.Zero, false); // do the encoding Utils.DecodeAllData(stream, true); a.Stop();
EncoderAIFF w = new EncoderAIFF(0); a.InputFile = "testIn.wav"; a.OutputFile = "testOut.aif"; a.WAV_BitsPerSample = 24; a.Start(null, IntPtr.Zero, false); a.Stop();
private RECORDPROC _recProc; // init your recording device (we use the default device) if ( !Bass.BASS_RecordInit(-1) ) MessageBox.Show(this, "Bass_RecordInit error!" ); _recProc = new RECORDPROC(RecordingHandler); // start recording at 44.1kHz, stereo (paused) int recHandle = Bass.BASS_RecordStart(44100, 2, BASSFlag.BASS_RECORD_PAUSE, _recProc, IntPtr.Zero); if (recHandle == Bass.FALSE) MessageBox.Show(this, "BASS_RecordStart error!" ); // setup the encoder EncoderAIFF a = new EncoderAIFF(recHandle); a.InputFile = null; a.OutputFile = "testrec.aif"; a.Start(null, IntPtr.Zero, true); // start encoder paused ... // now really start recording and encoding a.Pause(false); Bass.BASS_ChannelPlay(recHandle, false); ... // your recording will be encoded until you call a.Stop(); private bool RecordingHandler(int handle, IntPtr buffer, int length, IntPtr user) { return true; }