|
radio42
Posts: 4012
|
 |
« Reply #860 on: 29 Oct '10 - 16:08 » |
Quote
|
I don't know what the 'online-music' service is actually delivering in your STREAMPROC. But probably it doesn't deliver you all the header data...but... What have you tried it already?
And I am not sure if that is a specific Bass.Net question - or more something general?
|
|
|
|
|
Logged
|
|
|
|
|
|
|
hellbundy
Posts: 30
|
 |
« Reply #862 on: 31 Oct '10 - 12:29 » |
Quote
|
Hi. I was using Bass.Net API 2.4.6.5 version. I installed the new one (2.4.6.  . Now I get the below error in VB.NET 2008; Warning 1 Could not resolve this reference. Could not locate the assembly "Bass.Net, Version=2.4.6.5, Culture=neutral, PublicKeyToken=b7566c273e6ef480, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. WindowsApplication1 It doesn't accept the new reference... Is there a solution for this. Thanks.
|
|
|
|
|
Logged
|
|
|
|
|
radio42
Posts: 4012
|
 |
« Reply #863 on: 31 Oct '10 - 13:19 » |
Quote
|
Looks like you are still somehow referencing the old version. Have you tried to remove the existing one and add the new one. Actually I have never heard about such an issue before.
|
|
|
|
|
Logged
|
|
|
|
|
hellbundy
Posts: 30
|
 |
« Reply #864 on: 31 Oct '10 - 13:26 » |
Quote
|
That's right. It's looking for the old one. But I uninstalled it. Installed the new one but somehow I couldn't add the new reference. Thank you for your reply.
|
|
|
|
|
Logged
|
|
|
|
|
hellbundy
Posts: 30
|
 |
« Reply #865 on: 31 Oct '10 - 13:38 » |
Quote
|
Now I tried it with a new project and it works fine..
|
|
|
|
|
Logged
|
|
|
|
|
ken
Posts: 630
|
 |
« Reply #866 on: 31 Oct '10 - 14:08 » |
Quote
|
How do I easiest "upmix" an mono channel to a stereo channel? WASAPI gives me a mono channel (from a USB mic as input device that is proberly a mono device) even if I set chans as 2. _BassWasapiHandlerIn = new BassWasapiHandler(audioDevIn.DeviceID, false, audioDevIn.MixFreq, 2, 0f, 0f); _recChannel = _BassWasapiHandlerIn.InputChannel;
I'm trying this but output file from encoder i zero byte. BASS_CHANNELINFO _info = Bass.BASS_ChannelGetInfo(_recChannel);
if (_info.chans == 1) { int _convMixer = BassMix.BASS_Mixer_StreamCreate(44100, 2, BASSFlag.BASS_SAMPLE_FLOAT | BASSFlag.BASS_STREAM_DECODE); BassMix.BASS_Mixer_StreamAddChannel(_convMixer, _recChannel, BASSFlag.BASS_MIXER_FILTER);
_encoderMP2 = new EncoderTooLAME(_convMixer); _encoderMP2.InputFile = null; _encoderMP2.OutputFile = _FileName; _encoderMP2.TOO_Bitrate = BitRate; _encoderMP2.Start(null, IntPtr.Zero, false); }
|
|
|
|
« Last Edit: 31 Oct '10 - 16:27 by ken »
|
Logged
|
|
|
|
|
radio42
Posts: 4012
|
 |
« Reply #867 on: 31 Oct '10 - 19:38 » |
Quote
|
Have you checked BASS_ErrorGetCode after each Bass call? What does it return?
|
|
|
|
|
Logged
|
|
|
|
|
ken
Posts: 630
|
 |
« Reply #868 on: 1 Nov '10 - 09:27 » |
Quote
|
Have you checked BASS_ErrorGetCode after each Bass call? What does it return?
Just tested and I get BASS_OK after each call. I added BASSFlag.BASS_STREAM_AUTOFREE to BASS_Mixer_StreamAddChannel since I got BASS_ERROR_ALREADY. But still same problem, the output from EncoderTooLAME is 0 bytes.
|
|
|
|
|
Logged
|
|
|
|
|
radio42
Posts: 4012
|
 |
« Reply #869 on: 1 Nov '10 - 11:54 » |
Quote
|
Which TooLAME version are you using? And have tried using "TwoLAME" instead (which seems to be better and more compatible for MP2 encoding anyhow)?
|
|
|
|
|
Logged
|
|
|
|
|
ken
Posts: 630
|
 |
« Reply #870 on: 2 Nov '10 - 10:24 » |
Quote
|
Which TooLAME version are you using? And have tried using "TwoLAME" instead (which seems to be better and more compatible for MP2 encoding anyhow)?
TooLAME is version 0.2L . I also now tested with TwoLAME (0.3.12b) but same result. When using EncoderLAME the file is 4Kb in size, but unplayable. If must be some strange with "up-mix", since if I use a "normal" audio device (stereo) then encoding works with all encoders.
|
|
|
|
|
Logged
|
|
|
|
|
radio42
Posts: 4012
|
 |
« Reply #871 on: 2 Nov '10 - 11:05 » |
Quote
|
When using any Encoder instance with a decoding channel, you must of course call BASS_ChannelGetData in a loop in order to pull the data through the encoder (in your case on "_convMixer") - are you NOT doing that? Please, also take a look to the Bass.Net documentation for more info...
|
|
|
|
|
Logged
|
|
|
|
|
ken
Posts: 630
|
 |
« Reply #872 on: 2 Nov '10 - 14:31 » |
Quote
|
When using any Encoder instance with a decoding channel, you must of course call BASS_ChannelGetData in a loop in order to pull the data through the encoder (in your case on "_convMixer") - are you NOT doing that? Please, also take a look to the Bass.Net documentation for more info...
if I encode the channel from WASAPI _recChannel = _BassWasapiHandlerIn.InputChannel;
All is good (when I don't use mono soundcard) But when I try to up-mix the channel to stereo with "BassMixer" it fail. How should I build an mono -> stereo converter that works on a "recoder channel"
|
|
|
|
|
Logged
|
|
|
|
|
radio42
Posts: 4012
|
 |
« Reply #873 on: 3 Nov '10 - 07:12 » |
Quote
|
Yes, when using a "BassWasapiHandler.InputChannel" as the encoding source, this stream gets automatically feed by the BassWasapiHandler, as the InputChannel is implemented as a Dummy stream internally. As the InputChannel is a dummy custom decoding stream, it can actually not be used as a mixer source stream - it can only be used to setup DSP/FX on it! If you want to plug the WasapiInput as a source to a mixer channel (as in your example), you must do the following: _BassWasapiHandlerIn.SetFullDuplex(0, BASSFlag.BASS_STREAM_DECODE, false); int fullDuplexStream = _BassWasapiHandlerIn.OutputChannel; int _convMixer = BassMix.BASS_Mixer_StreamCreate(44100, 2, BASSFlag.BASS_SAMPLE_FLOAT | BASSFlag.BASS_STREAM_DECODE); BassMix.BASS_Mixer_StreamAddChannel(_convMixer, fullDuplexStream, BASSFlag.BASS_MIXER_FILTER)
Note, that now the "BassWasapiHandler.OutputChannel" is used, which was created as a decoding stream!
|
|
|
|
|
Logged
|
|
|
|
|
aybe
Posts: 129
|
 |
« Reply #874 on: 9 Nov '10 - 02:53 » |
Quote
|
Thanks for the changes, I didn't see until I updated recently, I've made some tests and, 16 bit pixel format works, that's already half the battle for memory usage ! Sadly 8 bit doesn't but in .NET those transforms to indexed 8-bit always requires extra work like finding the palette. Whether WPF or Forms it's the same and I guess you didn't delve into that what I can understand ... I did a couple of searches around Octree and MedianCut, found a project that does the dither but it's far too slow for intensive usage. I started working on my own dither providing it's fast enough to process/use I'll post it in the forum. Thank you.
|
|
|
|
|
Logged
|
|
|
|
|
Zarkow
Guest
|
 |
« Reply #875 on: 20 Nov '10 - 19:25 » |
Quote
|
Downloaded the latest version (2.4.6.8.Net) and bass 2.4.4, run the examples (after copying bass.dll and bass.net.dll to the output dir) and sofar everything is working fine, very nice work.
One question, might be silly but since this is new for me... the note in the source-code (ex NetRadio.cs) mentions that I should copy basswma.dll to the output dir also, but I lack this file...do I need to download this file or is it some legacy comments in the code?
|
|
|
|
|
Logged
|
|
|
|
|
radio42
Posts: 4012
|
 |
« Reply #876 on: 20 Nov '10 - 19:41 » |
Quote
|
There are may addons available for BASS, one is basswma.dll - all can be downloaded from the un4seen page - see the menu on the left of this page.
|
|
|
|
|
Logged
|
|
|
|
|
|
|
hwahrmann
Posts: 116
|
 |
« Reply #878 on: 1 Dec '10 - 20:42 » |
Quote
|
What happened to the EncoderWinampAACplus.AACPlus_Mp4Box field?
is this no longer needed?
Edit: ah, seems no longer needed, because of libmp4v2.dll. Correct?
|
|
|
|
|
Logged
|
|
|
|
|
radio42
Posts: 4012
|
 |
« Reply #879 on: 2 Dec '10 - 07:00 » |
Quote
|
Correct! The MP4 output property is now called "AACPlus_UseMp4Output". However, this flag is automatically applied when encoding to an output file with the extension '.m4a' or '.mp4'.
|
|
|
|
|
Logged
|
|
|
|
|