28. November 1997
This is a draft of a real mixer interface for OS/2. With it, it will be possible to access every function of your sound card.
PMixerChannel = ^TMixerChannel; TMixerChannel = record Size : LongInt; Device : LongInt; ID : LongInt; ChannelType : LongInt; ChannelInfo : LongInt; Name : PChar; end; DeviceID = LongInt;
mix_CT_All = 0; {Enum all channels} mix_CT_Settings = 1; {Port, ...} mix_CT_Volume = 2; mix_CT_Output = 4; mix_CT_Input = 8; mix_CT_Other = 16;
mix_SI_Number = 1; {5..20} mix_SI_Field = 2; {5,7,10} mix_SI_PerCent = 4; {0-100%} mix_SI_Potency = 8; {0,1,2,4,8} mix_SI_Flag = 16; {0,1}
mix_VI_Mono = 1; mix_VI_Stereo = 2;
mix_OI_Number = 1; mix_OI_Field = 2; mix_OI_PerCent = 4; mix_OI_Potency = 8; mix_OI_Flag = 16;
mix_II_Number = 1; mix_II_Field = 2; mix_II_PerCent = 4; mix_II_Potency = 8; mix_II_Flag = 16;
mix_Priority_Normal = 1; mix_Priority_High = 2; mix_Priority_Mixer = 4;
Function MixBeginEnumDevice : LongInt; Function MixEnumNextDevice(Device : LongInt) : LongInt;
Function GetDeviceNameLen(Device : LongInt) : LongInt; Function GetDeviceName(Device : LongInt;Buffer : PChar;BufferLen : LongInt) : LongInt; Function GetDeviceManufacturerLen(Device : LongInt) : LongInt; Function GetDeviceManufacturer(Device : LongInt;Buffer : PChar;BufferLen : LongInt) : LongInt; Function GetDeviceVer(Device : LongInt) : LongInt; Function MixOpenDevice(Device,Priority : LongInt) : DeviceID; Function MixGetChannelPriority(Device : DeviceID) : LongInt; Function MixSetChannelPriority(Device : DeviceID;Priority : LongInt) : Bool; Function MixCopyDevice(Device : DeviceID) : DeviceID;
Function MixBeginEnumChannels(Device : LongInt;Channel : PMixerChannel;ChannelType : LongInt) : Bool; Function MixEnumNextChannel(Channel : PMixerChannel) : Bool; Function MixEndEnumChannels(Channel : PMixerChannel) : Bool);
Function MixGetNameLen(Device : DeviceID;ID : LongInt) : LongInt; Function MixGetName(Device : DeviceID;ID : LongInt;Buffer : PChar;BufferLen : LongInt) : Bool; Function MixGetIcon(Device : DeviceID;ID : LongInt) : HPointer; Function MixGetBitmap(Device : DeviceID;ID : LongInt) : HBitmap;
Function MixGetNr(Device : DeviceID;ID : LongInt;Lo.Hi : PLongInt) : Bool; Function MixSetNr(Device : DeviceID;ID : LongInt;Lo,Hi : PLongInt) : Bool;
Function MixGetFieldSize(Device : DeviceID;ID : LongInt) : LongInt; Function MixGetField(Device : DeviceID;ID : LongInt;Field : Pointer;FieldSize : LongInt) : Bool; Function MixSetField(Device : DeviceID;ID : LongInt;Field : Pointer;FieldSize : LongInt) : Bool;
Function MixGetFlag(Device : DeviceID;ID : LongInt) : Bool; Function MixSetFlag(Device : DeviceID;ID : LongInt;Status : Bool) : Bool;
Function MixGetVolumeL(Device : DeviceID;ID : LongInt) : LongInt; Function MixGetVolumeR(Device : DeviceID;ID : LongInt) : LongInt; Function MixGetVolume(Device : DeviceID;ID: LongInt;L,R : PLongInt) : Bool; Function MixSetVolumeL(Device : DeviceID;ID,L : LongInt) : Bool; Function MixSetVolumeR(Device : DeviceID;ID,R : LongInt) : Bool; Function MixSetVolume(Device : DeviceID;ID,L,R : LongInt) : Bool; Function MixGetVolumeMono(Device : DeviceID;ID : LongInt) : LongInt; Function MixSetVolumeMono(Device : DeviceID;ID,M : LongInt) : Bool;
Function MixRegisterChannelHook(Device : DeviceID;ID : LongInt;Hook : Pointer) : LongInt; Function MixDeregisterChannelHook(Device : DeviceID;Hook : LongInt) : Bool; Function MixRegisterDeviceHook(Device : DeviceID;Hook : Pointer) : LongInt; Function MixDeregisterDeviceHook(Device : DeviceID;Hook : LongInt) : Bool;
Not specified in this draft.
Homepage: http://www.datacomm.ch/~cbratschi/
© 1997 by Christoph Bratschi