Assembly: Bass.Net (in Bass.Net.dll) Version: 184.108.40.206
public static int BASS_StreamCreateDevice( int freq, int chans, BASSFlag flags, IntPtr user )
Public Shared Function BASS_StreamCreateDevice ( freq As Integer, chans As Integer, flags As BASSFlag, user As IntPtr ) As Integer
- Type: SystemInt32
- Type: SystemInt32
- Type: Un4seen.BassBASSFlag
- Type: SystemIntPtr
User instance data to pass to the callback function.
Return ValueType: Int32
If successful, the device's final output mix stream's handle is returned, else 0 is returned. Use BASS_ErrorGetCode to get the error code.
Each device has a single final output mix stream, which can be used to apply DSP/FX to the device output. Multiple requests for a final output mix stream (using STREAMPROC_DEVICE) on the same device will receive the same stream handle, which cannot be freed via BASS_StreamFree(Int32). It will automatically be freed if the device's output format (sample rate or channel count) changes. A BASS_SYNC_FREE sync can be set via BASS_ChannelSetSync(Int32, BASSSync, Int64, SYNCPROC, IntPtr) to be notified when this happens, at which point a new stream with the device's new format could be created.
|BASS_ERROR_INIT||has not been successfully called.|
|BASS_ERROR_NOTAVAIL||Only decoding channels (BASS_STREAM_DECODE) are allowed when using the "no sound" device. The BASS_STREAM_AUTOFREE flag is also unavailable to decoding channels.|
|BASS_ERROR_FORMAT||The sample format is not supported by the device/drivers. If the stream is more than stereo or the BASS_SAMPLE_FLOAT flag is used, it could be that they are not supported.|
|BASS_ERROR_SPEAKER||The specified SPEAKER flags are invalid. The device/drivers do not support them, they are attempting to assign a stereo stream to a mono speaker or 3D functionality is enabled.|
|BASS_ERROR_MEM||There is insufficient memory.|
|BASS_ERROR_NO3D||Could not initialize 3D support.|
|BASS_ERROR_UNKNOWN||Some other mystery problem!|
The STREAMPROC_DEVICE option is not available when using DirectSound output on Windows because BASS does not produce the final output mix then.