[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] Re: Freesound2 quark current statuss



Hi All,

I too have been working on a project with this Freesound2 quark.  For now everything is great and working fine, I am just wondering about the new APIv2.  On freesound.org it says the APIv1 will stop working at the end of the year.  Are there any plans to update Freesound2 to work with the new API?  I would appreciate any information on this, and thank you so much for the current freesound quark.

Thanks,
Dan

On Mon, Dec 15, 2014 at 10:09 PM, James Harkins <jamshark70@xxxxxx> wrote:
On December 16, 2014 9:31:35 AM Bruno Ruviaro <bruviaro@xxxxxxx> wrote:

Perhaps a "while" statement can help? Sorry I don't have an example at
hand, but look at the Control Structures help file.

As Julian already pointed out, this is what Condition is for.

t = Task {
   var c = Condition.new;
   paths.do { |path|
       path.someMethod(action: {
           c.unhang;
       });
       c.hang;
   };
}.play;

path.someMethod is where you would invoke the FreeSound class. The action function says to resume the task after the method finished its work. So you kick off the asynchronous method, put the unhang hook in place, and then "hang" (pause) the task.

It's a general solution for any sequence of asynchronous operations.

hjh

Sent with AquaMail for Android
http://www.aqua-mail.com






_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/