1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-18 17:10:05 +02:00

6 Commits

Author SHA1 Message Date
richardash1981
e7397b9f23 Fix crash when mix-and-rendering a single, panned, mono track because we have m,ono input and stereo output. Name should be an attribute of a track object whih is singular, regardless of number of channels! 2011-08-29 10:16:11 +00:00
richardash1981
a33ef8ef9b r11246 didn't work, because the track list passed is the list of all tracks in project, not just the ones we are working on. This change resolves this by using a handy iterator which only gives out the tracks we need to work with. This could and should replace all other uses of iter in this function, but that's rather more invasive just now. 2011-08-28 20:14:47 +00:00
richardash1981
819d13dc76 Add a variety of comments to this otherwise uncommented code.
Update the implementation to make sense in a multi-clip environment.
Previously, a mix-and-rendered track always contained silence from time zero
until the time at which the first audio happened, as well as silence between
sections of rendered audio. Any audio before time zero was silently lost.
These changes mean that the single rendered clip now starts at the first sound in any of the tracks being mix-and-rendered and stops at the end of the last sound. This avoids a lot of unneccessary silence, and ensures that mix-and-rendering a single clip in a track leaves the clip the same length in the new, rendered, track. This is very useful.
These changes should also fix at least one bug in the case where a user-defined selection is being mix-and-rendered, although it is not currently possible to do this from the UI.
2011-08-28 19:54:03 +00:00
richardash1981
6128684055 If only mix and rendering one track, make the new track have the same name.
This saves a lot of typing if it is necessary to render a lot tracks in-place whilst preserving their names.
It is currently impossible to test that the two channels of stereo tracks get the correct name, as making stereo tracks always results in tracks with the same name for both channels ... This code would be much simpler if stereo tracks were objects.
This function (Mix and Render) could be made simpler if it used the TrackList functions like GetNumExportChannels() and made better use of conditional iterators rather than working it out for itself.
2011-08-28 19:30:17 +00:00
v.audacity
54bd928ef6 regarding bug 9:
Was able to make the bug occur after lots of fast clicking around, by double-clicking Preview in Amplify dialog. 

The key seems to be the call to wxYield. That function is obsolete, but looking at the documentation for its successor, wxApp::Yield(): 

"Caution should be exercised, however, since yielding may allow the user to perform actions which are not compatible with the current task. Disabling menu items or whole menus during processing can avoid unwanted reentrance of code: see ::wxSafeYield for a better function."

That sounds like exactly the situations where this has occurred. And the documentation for ::wxSafeYieldsays: 

"This function is similar to wxYield, except that it disables the user input to all program windows before calling wxYield and re-enables it again afterwards."

Sounds like what we need. So I went through the code and for all the wxYield and wxGetApp()::Yield occurrences where Audacity is doing some drawing or already in the process of responding to a GUI event, I replaced them with ::wxSafeYield. Replaced all the remaining wxYield calls with calls to wxGetApp()::Yield().

Haven't been able to replicate the bug since these changes. Please test.
2010-07-23 23:29:50 +00:00
ra
e74978ba77 Locate and position the current Audacity source code, and clear a variety of old junk out of the way into junk-branches 2010-01-23 19:44:49 +00:00