bass.dll

How to play a spotify music stream

泪湿孤枕 提交于 2019-12-21 21:30:59
问题 First of all, i am new to audio-programming, so bear with me. I am trying to play spotify music with NAudio or BASS.Net or any other .net audio-library. As far as i known, libspotify delivers music as raw PCM data. what is the sample rate of spotify stream (libspotify)? From the spotify docs: Samples are delivered as integers, see sp_audioformat. One frame consists of the same number of samples as there are channels. I.e. interleaving is on the sample level. When i try to play a song, spotify

How to realize a multi channel audio pre-mixer in .net

最后都变了- 提交于 2019-12-21 20:44:48
问题 I'd like to use C# to implement an application that can play multiple audio streams at the same time. Peanuts - now the interesting part: assuming every stream is single channel (mono) I want to adjust the volume for every speaker (5.1 or even 7.1) for every stream separately. I can use the windows mixer to do this, but the problem is, that there is only one mixer and I want to adjust this for every stream separately. Any ideas how to implement this? My first guess was to multiplex the stream

Plotting an audio spectrum

青春壹個敷衍的年華 提交于 2019-12-13 06:13:08
问题 I'm trying to implement an app that plot the spectrum of an audio using bass audio (http://www.un4seen.com/). My understanding is that I will have to: Get the FFT data from the stream float[] buffer = new float[256]; Bass.BASS_ChannelGetData(handle, buffer, (int)(BASS_DATA_FFT_COMPLEX|BASS_DATA_FFT_NOWINDOW)); For each fft, compute it’s magnitude Apply a window function to the FFT (Hanning or Hamming will do) then, draw a beautiful spectrum analysis The problem however is that: It seems that

Delphi: load BASS DLL and play MP3

天涯浪子 提交于 2019-12-05 06:38:01
I want to load a bass dll manually from somewhere and then play a mp3 file. How to do that? Delphi XE2. My attempt doesn't work: type QWORD = Int64; HSTREAM = LongWord; type TBASS_ChannelPlay = function(handle: HSTREAM; restart: LongBool): LongBool; stdcall; type TBASS_StreamCreateFile = function(mem: LongBool; f: Pointer; offset, length: QWORD; flags: LongWord): HSTREAM; stdcall; procedure PlayMP3(FileName: string); var BASS_ChannelPlay: TBASS_ChannelPlay; BASS_StreamCreateFile: TBASS_StreamCreateFile; DllHandle: THandle; MP3Stream: HSTREAM; DllPath:string; pFileName:pchar; begin DllPath:= 'c

How to realize a multi channel audio pre-mixer in .net

孤街醉人 提交于 2019-12-04 12:25:49
I'd like to use C# to implement an application that can play multiple audio streams at the same time. Peanuts - now the interesting part: assuming every stream is single channel (mono) I want to adjust the volume for every speaker (5.1 or even 7.1) for every stream separately. I can use the windows mixer to do this, but the problem is, that there is only one mixer and I want to adjust this for every stream separately. Any ideas how to implement this? My first guess was to multiplex the stream eight times (7.1), apply the volume level for every "channel" and then send it to the windows mixer,