Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Play Multiple file simultaneously with EZAudioFile & EZOutput not working #59

Open
cutmaster opened this issue Jun 8, 2014 · 3 comments

Comments

@cutmaster
Copy link

Hi Hali,
First thanks a lot for your very helpful components.
I'm actually writing a new derivated component, (a Player) which is provided to include EZAudioFile & EZOutput, and to play files (including loop playback, audio plugins, etc.)
Actually, it starts working well... Except if I try to load two instances of my component and playing them together.
In fact, the second instance won't playback.
I've tried to manage using either [EZOutput sharedOuput] and an instance of EZOutput alloc/init per component, but nothing changes.
How can I achieve this to work ?
Why doesn't the EZOutput component want to play 2 files (or more) at a time ?
Thanks a lot for your help.
Bests,
Laurent.
ezcutmasterplayerdemo

@cutmaster
Copy link
Author

Answering to myself and to people who are looking for a solution :
To do so, you must :

  1. not use the dispatch_once token
  2. create a pointer to an EZOutput YOU handle by allocating it (instead of using sharedOutput)
if (audioOutput != nil) { if ([audioOutput isPlaying]) [audioOutput stopPlayback]; [audioOutput setOutputDataSource:nil]; audioOutput = nil; } audioOutput = [[EZOutput alloc] init]; [audioOutput setOutputDataSource:self];

@syedhali
Copy link
Owner

Sorry for the late reply, have you checked out the EZAudioPlayer?

@cutmaster
Copy link
Author

hi syedhali,
This component is in fact derivated from your EZAudioPlayer. It uses the same first methods and adds some other to be able to have start zone, loop zone, end zone, and playlist inside the audiofile.
But actually if you try to do the same with EZAudioPlayer you get the same behaviors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants