HSTREAM wmahandle;HWMENCODE encoder;...DWORD freq,mono;wmahandle=BASS_WMA_StreamCreateFile(...);BASS_ChannelGetAttributes(wmahandle,&freq,0,0);mono=BASS_ChannelGetFlags(wmahandle)&BASS_SAMPLE_MONO;encoder=BASS_WMA_EncodeOpenFile(freq,mono,bitrate,filename);BASS_ChannelSetDSP(wmahandle,&EncoderProc,0);...void CALLBACK EncoderProc(HDSP handle,DWORD channel,void *buffer,DWORD length,DWORD user){ BASS_WMA_EncodeWrite(encoder,buffer,length);}