buzz forums

forums of the buzz
It is currently Sat Dec 16, 2017 9:14 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Wed Feb 01, 2017 2:48 pm 
User avatar

Joined: Sun Nov 27, 2011 5:19 pm
Posts: 195
Hello !

I'm looking for a way to add some extra data to a song.
The data should be available from every instance of PatternXP, that is why I don't want to save the data as a part of the machine.

The only solution I can think of is to create another machine, a dummy one, to act as a server of this extra data.
But it seems a lot of work ...

If anyone have a very clever idea for my problem, that would be great :-)


Top
 Profile  
 
PostPosted: Wed Feb 01, 2017 9:57 pm 
User avatar

Joined: Mon Nov 21, 2011 9:42 pm
Posts: 680
use an atomic global boolean to check in every save() callback if the data was already written.
for loading do something similar. the instance that actually holds the data fills the shared data.

should work, unless someone has a better idea.


Top
 Profile  
 
PostPosted: Thu Feb 02, 2017 11:16 am 
User avatar

Joined: Sun Nov 27, 2011 5:19 pm
Posts: 195
UNZ wrote:
use an atomic global boolean to check in every save() callback if the data was already written.
for loading do something similar. the instance that actually holds the data fills the shared data.

should work, unless someone has a better idea.

That could be. I thought about that, but if this instance is removed, I have to send the data to another.
That's probably not impossible.

I had also the idea to use the "Info View" to save the data, I don't know if a lot of people use it ?


Top
 Profile  
 
PostPosted: Fri Feb 03, 2017 11:25 pm 
User avatar

Joined: Mon Nov 21, 2011 9:42 pm
Posts: 680
remember that there is only one instance of "data". so since the data would be shared (either global or static inside your class) you dont really have to "send the data to another", instead whatever instance gets to save first just does the real save and the others dont save anything. the pointer to the data is the same in every instance.


Top
 Profile  
 
PostPosted: Mon Feb 06, 2017 11:11 am 
User avatar

Joined: Sun Nov 27, 2011 5:19 pm
Posts: 195
UNZ wrote:
remember that there is only one instance of "data". so since the data would be shared (either global or static inside your class) you dont really have to "send the data to another", instead whatever instance gets to save first just does the real save and the others dont save anything. the pointer to the data is the same in every instance.

You are right, that's what I'll do, thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group