|
Delphinus
Posts: 39
|
 |
« Reply #480 on: 4 May '12 - 16:19 » |
Quote
|
Argh sorry the problem was I call ChannelSetFX each time a value changed, so I set this juste once at the begining. Like this effect works.
Now I notice someting, when I touch the screen and then stop touching it, it doesn't end the loop instantly as if it continues to be in the loop. So what's the cause of it?
|
|
|
|
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15366
|
 |
« Reply #481 on: 4 May '12 - 17:04 » |
Quote
|
Check that BASS_ChannelRemoveSync is being called to remove the sync, and that the call is reporting success (returning TRUE).
|
|
|
|
|
Logged
|
|
|
|
|
Delphinus
Posts: 39
|
 |
« Reply #482 on: 4 May '12 - 17:13 » |
Quote
|
I did call BASS_ChannelRemoveSync and it returned TRUE.
|
|
|
|
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15366
|
 |
« Reply #483 on: 4 May '12 - 17:33 » |
Quote
|
Perhaps there have been multiple syncs set at the same position? You could try logging the sync calls to confirm that there is a successful BASS_ChannelRemoveSync call for each BASS_ChannelSetSync call.
|
|
|
|
|
Logged
|
|
|
|
|
Delphinus
Posts: 39
|
 |
« Reply #484 on: 4 May '12 - 18:11 » |
Quote
|
Ok thanks  . That was another problem but it helps though I also notice that changing the pitch take a little time before being applied. I touch the screen at a certain x then on another x and it takes time to hear the new pitch value.
|
|
|
|
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15366
|
 |
« Reply #485 on: 5 May '12 - 13:58 » |
Quote
|
Yep, there will be a delay in the pitch changes becoming audible, due to the stream's playback buffer. You can reduce the delay by reducing the length of the buffer via the BASS_CONFIG_BUFFER option (also see BASS_CONFIG_UPDATEPERIOD).
|
|
|
|
|
Logged
|
|
|
|
|
Delphinus
Posts: 39
|
 |
« Reply #486 on: 7 May '12 - 09:42 » |
Quote
|
Hmm weird I tried to set the minimum value for BASS_CONFIG_BUFFER then it didn't changed anything still have the latency. The same happened with UPDATE_PERIOD set to the minimum value
|
|
|
|
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15366
|
 |
« Reply #487 on: 7 May '12 - 15:02 » |
Quote
|
Check that you're lowering BASS_CONFIG_UPDATEPERIOD before BASS_CONFIG_BUFFER, as the latter is limited by the former. For the minimum possible latency, you could also try the BASS_ATTRIB_NOBUFFER option instead. Please see the documentation for details on that.
|
|
|
|
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15366
|
 |
« Reply #488 on: 8 May '12 - 15:22 » |
Quote
|
The latest BASSmix version (2.4.7) is now up in the iOS package, in the 1st post.
|
|
|
|
|
Logged
|
|
|
|
|
Delphinus
Posts: 39
|
 |
« Reply #489 on: 9 May '12 - 12:23 » |
Quote
|
It doesn't change anything, plus I don't see the BASS_ATTRIB_NOBUFFER attribute.
In my app each touch on the screen will trigger the loop and play it and changes the pitch if touch move. So if we touch with two finger it will trigger and play it twice e.g two different stream
Do I have to use BASSmix instead of lauching two or more stream?
|
|
|
|
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15366
|
 |
« Reply #490 on: 9 May '12 - 17:09 » |
Quote
|
Perhaps you have an old version of the BASS.H header; the BASS_ATTRIB_NOBUFFER option was introduced in BASS 2.4.7. It's the same header (and documentation) for all platforms, so you can take the latest version from the Win32/OSX/Linux packages. You don't necessarily need to use BASSmix to play 2 or more streams. My BASSmix post/announcement above was a general notification for all iOS users, not related to your issue 
|
|
|
|
|
Logged
|
|
|
|
|
Delphinus
Posts: 39
|
 |
« Reply #491 on: 9 May '12 - 17:20 » |
Quote
|
You were right I had an old .h version and my question wasn't related to my issue xD
|
|
|
|
|
Logged
|
|
|
|
|
einsteinx2
Posts: 61
|
 |
« Reply #492 on: 26 May '12 - 03:02 » |
Quote
|
Ian, so far the MPC plugin is working great, with the exception that occasionally, BASS tries to use the MPC plugin when it's not an MPC file and it causes a crash. The only time I've gotten it to occur in my own testing (and not in a crash log from a user) I was resuming in the middle of an mp3 file (pulling the file down from the server starting in the middle of the file). The only issue this has ever caused in the past is that BASS occasionally wouldn't play the file because it could not identify it. It seems now that occasionally in those situations where it can't identify it, it's mistakenly identifying as MPC and that causes the crash.
--------
EDIT: actually ignore this part below for now, I believe I found the issue. The files I was using were raw AAC with no mp4 container
Unrelated, I've run into a bug with seeking when playing low bitrate HE-AAC files (in this case 48kbps). For some reason, any time a file is being streamed (so the whole file is not available on disk when playback starts) I cannot skip past the current play point. I always get an error 7, invalid file position. In my file len proc, I'm using the final file size, not the current size on disk (as that doesn't work). Skipping within songs while they're downloading works fine for all other file formats, it's just HE-AAC that has this issue.
Interestingly, the test file I sent you (and all the others I have like it) won't play at all with BASS on my second generation iPod touch (the same hardware as the old iPhone 2G and 3G), but they play fine on all my newer devices, except for the seeking issue.
|
|
|
|
« Last Edit: 27 May '12 - 02:55 by einsteinx2 »
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15366
|
 |
« Reply #493 on: 28 May '12 - 16:07 » |
Quote
|
Ian, so far the MPC plugin is working great, with the exception that occasionally, BASS tries to use the MPC plugin when it's not an MPC file and it causes a crash. The only time I've gotten it to occur in my own testing (and not in a crash log from a user) I was resuming in the middle of an mp3 file (pulling the file down from the server starting in the middle of the file). The only issue this has ever caused in the past is that BASS occasionally wouldn't play the file because it could not identify it. It seems now that occasionally in those situations where it can't identify it, it's mistakenly identifying as MPC and that causes the crash.
To investigate further, please upload the MP3 file that you had the crash with and give the offset you used to produce it. ftp.un4seen.com/incoming/Interestingly, the test file I sent you (and all the others I have like it) won't play at all with BASS on my second generation iPod touch (the same hardware as the old iPhone 2G and 3G), but they play fine on all my newer devices, except for the seeking issue.
I'm not sure if the older generation devices support HE-AAC, which is what your test file is. I tried copying the file onto a 2nd gen iPod Touch, and iTunes refused to do so because "it cannot be played on this iPod". To at least make the files playable but with reduced quality, I've put an updated BASS build up (in the first post) that will decode HE-AAC files as plain AAC in that case.
|
|
|
|
|
Logged
|
|
|
|
|
Grhyll
Guest
|
 |
« Reply #494 on: 29 May '12 - 11:44 » |
Quote
|
Hello,
I feel pretty dumb, since I seem to be the only one who can't manage to make it work, but... how do I use this .a library in my XCode projet? I've added the .a file and made all the other steps described in the first post of this topic, but then, since I don't have a header for the lib, I don't know how to use the functions and make XCode recognize those functions... I hope I am understandable and someone will be able to help me on this...
|
|
|
|
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15366
|
 |
« Reply #495 on: 29 May '12 - 13:32 » |
Quote
|
The same header (BASS.H) is used on all supported platforms, so you can take that file from one of the BASS packages (Win32/OSX/Linux) available on the BASS webpage. You can also find the BASS documentation (BASS.CHM) in those packages.
|
|
|
|
|
Logged
|
|
|
|
|
Grhyll
Guest
|
 |
« Reply #496 on: 29 May '12 - 13:59 » |
Quote
|
Great, now I feel even dumber  Thank you, I finally found it, I just got confused with the Win64 version (which I believe does not have the header neither) and did not see the Win32 link on top.....
|
|
|
|
|
Logged
|
|
|
|
|
ppeau
Posts: 14
|
 |
« Reply #497 on: 5 Jun '12 - 04:54 » |
Quote
|
Hi I've got a simple question.
Why the callback plays the stream very fast and not at the correct frequency or speed? or Which setting can I change, to get the correct speed?
Thank for you help?
and this my simple code :
#import "ViewController.h" HSTREAM stream; HSTREAM mainStream;
@implementation ViewController
DWORD CALLBACK playStream(HSTREAM handle, void* writeBuffer, DWORD length, void* user) { DWORD r = BASS_ChannelGetData(mainStream, writeBuffer, length); if (r==(DWORD)-1) return BASS_STREAMPROC_END; // signal the end return r; }
- (id)init { if(self = [super init]) {
BASS_Init(-1, 44100, 0, 0, NULL); BASS_SetConfig(BASS_CONFIG_BUFFER, 500); BASS_SetConfig(BASS_CONFIG_UPDATETHREADS, 1); BASS_SetConfig(BASS_CONFIG_UPDATEPERIOD, 200); BASS_INFO info; BASS_GetInfo(&info); stream = BASS_StreamCreate(info.freq, 2, BASS_SAMPLE_FLOAT, (STREAMPROC*)&playStream, nil); mainStream = BASS_StreamCreateFile(0, [[[NSBundle mainBundle] pathForResource:@"sample" ofType:@"mp3"] UTF8String], 0, 0, BASS_SAMPLE_FLOAT|BASS_STREAM_PRESCAN|BASS_STREAM_DECODE); BASS_ChannelPlay(stream, false); } return self; }
@end
|
|
|
|
|
Logged
|
|
|
|
|
Ian @ un4seen
Administrator
Posts: 15366
|
 |
« Reply #498 on: 5 Jun '12 - 17:02 » |
Quote
|
The output stream ("stream") should be created with the sample format of the data that it's playing (from "mainStream"), rather than the device's format (BASS will convert the stream's data during playback if necessary). You can use BASS_ChannelGetInfo to get the format, so something like this... mainStream = BASS_StreamCreateFile(0, [[[NSBundle mainBundle] pathForResource:@"sample" ofType:@"mp3"] UTF8String], 0, 0, BASS_SAMPLE_FLOAT|BASS_STREAM_PRESCAN|BASS_STREAM_DECODE); BASS_CHANNELINFO info; BASS_ChannelGetInfo(mainStream, &info); stream = BASS_StreamCreate(info.freq, info.chans, BASS_SAMPLE_FLOAT, (STREAMPROC*)&playStream, nil);
|
|
|
|
|
Logged
|
|
|
|
|
ppeau
Posts: 14
|
 |
« Reply #499 on: 6 Jun '12 - 01:08 » |
Quote
|
The output stream ("stream") should be created with the sample format of the data that it's playing (from "mainStream"), rather than the device's format (BASS will convert the stream's data during playback if necessary). You can use BASS_ChannelGetInfo to get the format, so something like this... mainStream = BASS_StreamCreateFile(0, [[[NSBundle mainBundle] pathForResource:@"sample" ofType:@"mp3"] UTF8String], 0, 0, BASS_SAMPLE_FLOAT|BASS_STREAM_PRESCAN|BASS_STREAM_DECODE); BASS_CHANNELINFO info; BASS_ChannelGetInfo(mainStream, &info); stream = BASS_StreamCreate(info.freq, info.chans, BASS_SAMPLE_FLOAT, (STREAMPROC*)&playStream, nil);
Thank a lot Ian, that works like a charm
|
|
|
|
|
Logged
|
|
|
|
|