alexmercerind / flutter_audio_desktop

[WIP] An 🎵 audio playback library for Flutter Desktop. Supports Windows & Linux. Based on miniaudio.
MIT License
52 stars 18 forks source link

Wave Generation APIs #7

Closed MichealReed closed 3 years ago

MichealReed commented 3 years ago

This PR adds the following on Windows and Linux:

Wave Types 0 = sine 1 = square 2 = triangle 3 = sawtooth

loadWave(amplitude, frequency, waveType) setWaveAmplitude(amplitude) setWaveFrequency(frequency) setWaveSampleRate(sampleRate)

I edited the example to allow loading of a wave and a few controls. Happy to rework if you see something that could be improved with this implementation. I'll likely add the buffer API at some point as well.

alexmercerind commented 3 years ago

Seems nice. I just have a request can we stop making "code style" related changes like placement of body brackets etc. Thankyou.

MichealReed commented 3 years ago

Ah, the style changes would be from the auto formatter. I can try to revert, but it seems more like conventional C++ now versus dart style on C++ code.

MichealReed commented 3 years ago

@alexmercerind can you go ahead and merge this or would you like me to restore the original formatting first? Have other improvements I want to land, but cannot until this is merged due to branching issues.