Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

audio: Improve performance and add error checks. #31

Merged
merged 1 commit into from
Nov 22, 2012
Merged

Conversation

jonls
Copy link
Member

@jonls jonls commented Nov 21, 2012

audio: Don't use slow insertion sort for sound list, just prepend instead.
audio: Add error check after mallocs.
audio: Simplify midi node comparison function.

I can see that for correct midi production the midi nodes need to be sorted by time, but I couldn't find any reason for keeping the sfx cache list sorted. @wdigger any reason for this?
It might be good to use a better data structure for this in the future but for now it is not that important since the midi production is only done once when the track is started, and there are not that many sounds.

audio: Don't use slow insertion sort for sound list, just prepend instead.
audio: Add error check after mallocs.
audio: Simplify midi node comparison function.
@wdigger
Copy link
Member

wdigger commented Nov 22, 2012

I have nothing against.

@jonls jonls merged commit 1d4bb7d into master Nov 22, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants