On Thu, Jan 21, 2010 at 07:48:20AM -0500, Paul Coccoli wrote: > On Thu, Jan 21, 2010 at 6:37 AM, torbenh <[email protected]> wrote: > > well.. the real problems are a bit deeper. > > and not really touched be any example clients. > > > > you need to have lockfree access to the note sequence. > > while still being able to manipulate it from the gui thread. > > > > several approaches to achieve this are possible. and it depends a bit on > > taste and the app to select them. > > > > but the major part of complexity lies here. > > > > I assume std::priority_queue can't be used, because it uses a > std::vector which will, under the covers, allocate memory from the > stack.
you can specify an Allocator for most STL containers. but i am not aware of anybody using them with an RT safe allocator. might be possible. but the allocator is not the problem. its lockfree access. > > It would be interesting to try to write an STL queue-like container > with an allocator that grabbed chunks of memory from a pool in an > RT-safe way. Maybe via message-passing over a ringbuffer? Anyone > seen/have such a thing? dunno... i never looked at implementing an allocator. shouldnt be that hard. but as stated, this is still a trivial part of the problem. -- torben Hohn _______________________________________________ Linux-audio-dev mailing list [email protected] http://lists.linuxaudio.org/listinfo/linux-audio-dev
