Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Mon Aug 26, 2019 12:46 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: MBS Port Audio/Quicktime and editable movie in memory
PostPosted: Wed Mar 16, 2011 12:59 pm 
Offline

Joined: Wed Aug 05, 2009 11:44 am
Posts: 36
Hi All,

I'm creating a little loop program that takes several audio files, layers them and then loops them.

This is what it currently does:

1. First I create an editable movie, then I create a few audio tracks in it (using the NewSoundTrack method) and layer the audio I need at the correct intervals.
2. I use the MBS Quicktime exporters to create a flat AIFF file in memory.
3. I then play that AIFF loop again and again using the MBS buffered port audio class.

Here's the problem. The MBS exporters can create the AIFF in memory without writing anything to disk (using ExportToMemory method). This is ideal as the loop data can be changed quickly so I don't want to be swapping stuff to and from disk. The problem is that the initial editable movie always writes data to the disk and I can't simply create an editable movie in memory.

The loops I'm creating are only 2-3 seconds long so they're not too big to be held in memory when creating them.

According to the language reference I can do:
Dim vt as QTVideoTrack
Dim em as EditableMovie
Vt = em.NewVideoTrack(200, 200, 30000, 1001)


So I have tried:

Dim atrack as QTSoundTrack
Dim em as EditableMovie
atrack = em.NewSoundTrack()


But I always get nil object errors.

If I add:

dim fname as folderitem
em = fname.CreateMovie


With fname being a temp file name, then all works perfectly. Obviously this means that the editable movie is being created on disk which slows everything down a lot.

Is there any way to create an editable movie just in memory and create audio tracks within it? I don't need it to be written to disk.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours


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

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group