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

Recording after rebase to master #4994

Closed
wants to merge 112 commits into from

Commits on May 26, 2019

  1. Configuration menu
    Copy the full SHA
    8fd89ee View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e86fd69 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    34eb63c View commit details
    Browse the repository at this point in the history
  4. Mixer & PlayHandle: Support PlayHandle without audioPort and set

    audioPort as nullptr by default.
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    1720fcd View commit details
    Browse the repository at this point in the history
  5. Mixer -> pushInputFrames: Add an option to automaticly normalize input

    frames by the masterGain.
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    7074ac8 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    86eb13f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    45a484a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    c4b69a3 View commit details
    Browse the repository at this point in the history
  9. SampleTrack: Make sure an empty TCO with isRecord would still be

    "played" (recorded).
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    0a9debc View commit details
    Browse the repository at this point in the history
  10. SampleTrack: Reset the start time offset when importing a new

    SampleBuffer.
    
    That solves problem with recording that caused samples to be moved and
    messed up.
    
    Thanks @-BaraMGB for helping.
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    f72c5d9 View commit details
    Browse the repository at this point in the history
  11. SampleRecordHandle: Apply start offset to reocrded TCO.

    Previously, begining record in any position would result the data being
    in the end of the TCO.
    
    @see LMMS#3947 (comment)
    
    Thanks to @-BaraMGB :)
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    5241b4b View commit details
    Browse the repository at this point in the history
  12. Track, TrackView: Instead of trying every possible dynamic_cast in

    `updateMenu`, use a virtual function overriden by every Track
    implemetation.
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    55029bd View commit details
    Browse the repository at this point in the history
  13. SampleTrack Recording: Add per SampleTrack and a global fallback for the

    input channel configurations. And support recording of one channel and
    converting it to two.
    
    The user would be able to set their input config per track, or globally.
    For each recorded sampletrack, the recorded will get the channel config
    and will duplicate the samples from one channel to the other in a case
    of mono input.
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    5229868 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    e290203 View commit details
    Browse the repository at this point in the history
  15. SampleTrack -> RecordingChannel: Remove the default option, instead, all

    options unchecked will be considered as global default.
    
    Suggested by @-tresf, Thanks!
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    48fea61 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    6feeb4a View commit details
    Browse the repository at this point in the history
  17. SampleTrack: In a case of recording, play a sample TCO even if its

    actual data starts after that.
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    1bb14b5 View commit details
    Browse the repository at this point in the history
  18. SampleRecordHandle: Obtain the offset to the record with a parameter

    instead of hacking sampleBuffer ()->startFrame ().
    
    That solves a bug with `startFrame ()` being negetive in recording some
    cases.
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    cbd669c View commit details
    Browse the repository at this point in the history
  19. AudioJack: Fix a deadblock on exporting a sample with different sample

    rate.
    
    The deadblock was caused by the mixer stopping which make the recording
    thread to wait until it get started again and in the other side, the
    exporting thread which wants to acquire a mutex that had been locked by
    the recording thread.
    
    Many thanks to PhysSong :)
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    ef9d9e8 View commit details
    Browse the repository at this point in the history
  20. SongEditor: Hide the global channel selection toolbox when capture

    support is not available.
    
    Thanks to @-Sawuare.
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    31a69dd View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    52eef80 View commit details
    Browse the repository at this point in the history
  22. Bugfix - SampleTrack -> Load & Save: Fix recorded sample track not being

    played correctly after saving and loading a project due to sample rate
    not getting saved in the project file.
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    1e9845f View commit details
    Browse the repository at this point in the history
  23. Bugfix - SampleTrack -> Play: Fix sample track not being played in the

    right place when it not played from the begining.
    
    That has created a difference between the ticks and the metronome and
    the sample track.
    
    The cause of the problem was that the calculation of the frame to play
    was wrong: we had calculated `framesPerTick` according to the current
    engine's sample rate instead of the SampleBuffer's sample rate.
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    7b49167 View commit details
    Browse the repository at this point in the history
  24. SampleTrack -> Recording: Enable per-track record setting and

    automaticlly create "record sample tco" if there is no recording tco.
    
    This commit adds per-track record setting. If a sample track is set as
    record, lmms will check if there is a tco that set to record:
      * If there is, it will record into it.
      * If there is not, it will create a special tco that get created on
    recording, and as long as the recording.
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    333ba57 View commit details
    Browse the repository at this point in the history
  25. SampleTrack: On project save, save the values of SampleTrack::m_record

    and SampleTrack::m_recordingChannel.
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    16dc30b View commit details
    Browse the repository at this point in the history
  26. SampleTrack -> Minor: Reorder the constructor initialization order to

    avoid a warning.
    
    Thanks to @-PhysSong.
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    0b2d8a7 View commit details
    Browse the repository at this point in the history
  27. Travis: Use SDL2 on Windows.

    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    75f84d6 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    70f2046 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    96ccbfe View commit details
    Browse the repository at this point in the history
  30. CMake -> Install: Install SDL2.dll instead of SDL.dll.

    Many thanks to @-PhysSong.
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    5f68c8b View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    acc1b8e View commit details
    Browse the repository at this point in the history
  32. AudioSdl -> Recording - Bugfix: Due to spec.sampleRate being wrong,

    recording would stop early
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    715778f View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    79cddac View commit details
    Browse the repository at this point in the history
  34. basics: Change sampleFrame to std::array<sample_t, DEFAULT_CHANNELS>

    in order to make stantard containers be able to store it.
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    c881c14 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    84cea2b View commit details
    Browse the repository at this point in the history
  36. SampleRecordHandle and SampleTrack: Support in-recording updating and

    visualizing of a SampleTCO.
    
    SampleRecordHandle: Instead of adding buffers to a list and then joining
    it to new SampleBuffer. Add the in-recording to the new SampleBuffer.
    
    SampleTCOView: Make sure our SampleBuffer is not locked, if it is, skip
    this frame and flag it for update.
    
    Also make sure we're getting updated for a changes from
    SampleBuffer::sampleUpdated.
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    f394a59 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    e47cdd2 View commit details
    Browse the repository at this point in the history
  38. Recording and SampleTrack: Remove setSampleBuffer and introduce

    resetData. That solves a race condition when one thread calls
    sampleBuffer() and it gets destructed by another thread that calls
    setSampleBuffer.
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    ad3a03e View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    7e9a578 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    ee5981d View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    7118380 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    d588c56 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    1b7660d View commit details
    Browse the repository at this point in the history
  44. SampleBuffer: Remove the god function "update" and split it into a

    number of functions:
    - beginBufferChange, doneBufferChange: Guards for direct access to
    m_data. They will also resample the data if it is needed. Functions like
    `addData` will check additional parameter to know if we should lock the
    mixer in this context.
    - Add reverse and remove the attribute m_reversed: The only user was
    AudioFileProcessor and it added complexity for the file loading process.
    Right now we'll just `reverse` the buffer manually.
    - changeAudioFile: Will reset the current buffer and load a file into
    it.
    - Remove the raw constructor `SampleBuffer(sampleFrame*, f_cnt_t)`: It
    was used only once and could easily be converted to another constructor.
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    a5b684c View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    53d3b4c View commit details
    Browse the repository at this point in the history
  46. SampleRecordHandle: Tell mixer to remove us when we done. With

    isFinished (when possible).
    
    That will solve our "never ending recording after tco finishing" problem
    :)
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    c615235 View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    58314a4 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    0aab43a View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    c39ccbb View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    3d9efbb View commit details
    Browse the repository at this point in the history
  51. SampleBuffer -> Samplerate - Fix two sample rate issues:

    1. Resampling was the wrong (src_rate was invalid)
    2. SampleBuffer was using baseSampleRate as the default samplerate
    instead of the actual processingSampleRate.
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    f4a70a7 View commit details
    Browse the repository at this point in the history
  52. AudioJack: Use std::vector for buffer

    Improve performance by using std::vector::resize instead
    of deleting and reallocating every time.
    
    LmmsBasics: Add static asserts to make sure no padding is
    added to sampleFrame by std::array.
    
    Thanks to @-lukas-w!
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    b1ffa19 View commit details
    Browse the repository at this point in the history
  53. SampleBuffer: Don't use sharedObject

    Don't use sharedObject. It does not make any sense and could lead to
    bugs when allocated locally (see audio_file_processor). When needed,
    this commit used std::shared_ptr which was made for that.
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    210423f View commit details
    Browse the repository at this point in the history
  54. SampleBuffer: Use JournallingObject

    Exporting and restoring is universally done now by saveSettings and
    loadSettings. That's allows us to make sure we don't left any important
    attributes like "sampleRate" behind
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    90c9b74 View commit details
    Browse the repository at this point in the history
  55. SampleBuffer: Don't normalize any SampleBuffer's sample rate to the

    Mixer's processing rate.
    
    That could lead to ireversable sample loss. Now we'll only resample when
    it needed and the processing sample rate is higher than the buffer's
    sample rate.
    
    Thanks to @-PhySong for pointing it out!
    Reflexe committed May 26, 2019
    Configuration menu
    Copy the full SHA
    79c20bc View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    a26a8df View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    196f000 View commit details
    Browse the repository at this point in the history

Commits on May 27, 2019

  1. Configuration menu
    Copy the full SHA
    d0385d6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0132e33 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2ccd530 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ab9a2a3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8166e95 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0ba71ca View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a356e78 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    6fe3267 View commit details
    Browse the repository at this point in the history
  9. SampleTrack: Avoid crashes while recording by locking the mixer before

    making any changes in the track.
    Reflexe committed May 27, 2019
    Configuration menu
    Copy the full SHA
    3a43158 View commit details
    Browse the repository at this point in the history
  10. SampleTrackView: Fix visualization not being cleared between recording

    sessions and handle sample start offset properly.
    Reflexe committed May 27, 2019
    Configuration menu
    Copy the full SHA
    a056dfb View commit details
    Browse the repository at this point in the history
  11. SamplePlayHandle: Fix export issues by correctly calculating

    totalFrames.
    
    Many thanks to @-PhySong. What a great find.
    Reflexe committed May 27, 2019
    Configuration menu
    Copy the full SHA
    d11c826 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    09f0b0d View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    d2d8bd7 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    b1fed89 View commit details
    Browse the repository at this point in the history
  15. SampleBuffer -> Recording: Use less blocking locks with addData and

    resetData.
    
    I've added two new methods:
    	* tryAddData
    	* tryResetData
    
    Which do the same, but without locking. If we've failed to lock, no
    problem, just wait until the next time.
    Reflexe committed May 27, 2019
    Configuration menu
    Copy the full SHA
    b5123e6 View commit details
    Browse the repository at this point in the history
  16. SampleBuffer: Fix mono sample decoding

    Fixes a regression from 7bc0056 that
    wasn't fixed properly in c8337dc.
    lukas-w authored and Reflexe committed May 27, 2019
    Configuration menu
    Copy the full SHA
    8121812 View commit details
    Browse the repository at this point in the history
  17. SampleBuffer::play: Fix freq factor calculation

    Fixes regression from f765773 (presumably
    a copy/paste mistake)
    lukas-w authored and Reflexe committed May 27, 2019
    Configuration menu
    Copy the full SHA
    a4efebc View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    013d9f4 View commit details
    Browse the repository at this point in the history
  19. CMake: Fix finding jack when cross-compiling with non-standard CMake

    Thanks to @-PhysSong.
    lukas-w authored and Reflexe committed May 27, 2019
    Configuration menu
    Copy the full SHA
    46d2233 View commit details
    Browse the repository at this point in the history
  20. Fix PatMan patch loading

    Fixes a regression in 84a1f35.
    PhysSong authored and Reflexe committed May 27, 2019
    Configuration menu
    Copy the full SHA
    67d5c77 View commit details
    Browse the repository at this point in the history
  21. Fix setting sample buffer name

    Fixes a regression in 7bc0056
    that breaks showing file names.
    PhysSong authored and Reflexe committed May 27, 2019
    Configuration menu
    Copy the full SHA
    b6b61eb View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    7d8d130 View commit details
    Browse the repository at this point in the history
  23. MmAllocator: add missing constructors

    PhysSong authored and Reflexe committed May 27, 2019
    Configuration menu
    Copy the full SHA
    21b9569 View commit details
    Browse the repository at this point in the history
  24. Improve JACK finding logic

    * Enable WeakJACK only if JACK is available.
    
    * Try `pkg_check_modules` first when using WeakJACK, too.
    PhysSong authored and Reflexe committed May 27, 2019
    Configuration menu
    Copy the full SHA
    8200efb View commit details
    Browse the repository at this point in the history
  25. Don't try to resample empty data

    PhysSong authored and Reflexe committed May 27, 2019
    Configuration menu
    Copy the full SHA
    dd04ef7 View commit details
    Browse the repository at this point in the history
  26. Fix remaining file name reset issues

    PhysSong authored and Reflexe committed May 27, 2019
    Configuration menu
    Copy the full SHA
    60cf294 View commit details
    Browse the repository at this point in the history
  27. Fix JACK installer download

    Fixes a regression in 063b7c9.
    PhysSong authored and Reflexe committed May 27, 2019
    Configuration menu
    Copy the full SHA
    e98b133 View commit details
    Browse the repository at this point in the history
  28. Improve JACK installation on Windows

    * Bundle 64-bit version of JACK for 64-bit installer.
    * Change some CMake logic for NSIS
    PhysSong authored and Reflexe committed May 27, 2019
    Configuration menu
    Copy the full SHA
    2175eac View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    6e76182 View commit details
    Browse the repository at this point in the history
  30. Bugfix -> SampleBuffer: To avoid arithmetic exception, userWaveSample

    should return with empty buffer.
    Reflexe committed May 27, 2019
    Configuration menu
    Copy the full SHA
    ca9be24 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    1c9b53a View commit details
    Browse the repository at this point in the history
  32. SampleBuffer: Disable automatic up-sampling to the mixer's sample rate.

    Since it may cause quality loss, we have decided to remove it and just
    use on-the-fly resampling while playing.
    Reflexe committed May 27, 2019
    Configuration menu
    Copy the full SHA
    6ee074d View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    87239ac View commit details
    Browse the repository at this point in the history
  34. SampleBuffer: use the RAII pattern when changing its data

    Also renames misleading `shouldLockMixer` to `syncWithMixer`.
    PhysSong authored and Reflexe committed May 27, 2019
    Configuration menu
    Copy the full SHA
    283625c View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    3a47ded View commit details
    Browse the repository at this point in the history
  36. Mixer: Introduce RequestChangesGuard: a RAII verion of

    requestChangeInModel.
    
    Deprecate direct calls to requestChangeInModel.
    Reflexe committed May 27, 2019
    Configuration menu
    Copy the full SHA
    e206254 View commit details
    Browse the repository at this point in the history
  37. SampleBuffer: Seperate the class into 3 internal classes.

    - SampleBufferData: Responsible for audio data.
    - SampleBufferFileHelper: Responsible for loading audio files.
    - SampleBufferPlayInfo: Responsible for holding information such as
    startFrame, etc.
    
    This commit also removes `m_varLock` and guards all
    getters and setters with RequestChangesGuard. It
    will be replaced in the next commit with:
       - Setters: The same but async.
       - Getters: signal on change.
    Reflexe committed May 27, 2019
    Configuration menu
    Copy the full SHA
    5cfc4a3 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    d65c1d0 View commit details
    Browse the repository at this point in the history
  39. Introduce Threading.h and runAsync: std::async using

    QtConcurrent.
    Reflexe committed May 27, 2019
    Configuration menu
    Copy the full SHA
    00acb14 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    aac5600 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    4082d78 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    67186e2 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    6f36515 View commit details
    Browse the repository at this point in the history
  44. Track::createTCO: avoid creating tcos while rendering.

    This commit renames createTCO to unsafeCreateTCO and
    add a mixer guard on the new createTCO.
    Reflexe committed May 27, 2019
    Configuration menu
    Copy the full SHA
    0f8c6d6 View commit details
    Browse the repository at this point in the history
  45. SampleBuffer: Make setX functions async, remove get functions

    and add UpdatingVariable for SampleBuffer's info.
    Reflexe committed May 27, 2019
    Configuration menu
    Copy the full SHA
    855b070 View commit details
    Browse the repository at this point in the history
  46. SampleBuffer & SampleTCO visualization: visualize async only

    after an update from the SampleBuffer.
    Reflexe committed May 27, 2019
    Configuration menu
    Copy the full SHA
    8dc1475 View commit details
    Browse the repository at this point in the history
  47. Track: put mixer syncs in tco remove/add in order to avoid

    data races between the gui and the mixer.
    Reflexe committed May 27, 2019
    Configuration menu
    Copy the full SHA
    1c42efa View commit details
    Browse the repository at this point in the history
  48. SampleRecordHandle: move calls to SampleBuffer's methods

    out of the rendering threads in order to avoid deadlocks
    while trying to sync with the mixer.
    Reflexe committed May 27, 2019
    Configuration menu
    Copy the full SHA
    98d1062 View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    cd6ad7a View commit details
    Browse the repository at this point in the history
  50. Threading: Add runAccordingToLaunchType helper that will run

    a callable async / sync in the same thread according to a variable.
    Reflexe committed May 27, 2019
    Configuration menu
    Copy the full SHA
    7d8fdff View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    cde4baa View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    ab180b0 View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    91c6e96 View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    a7236e4 View commit details
    Browse the repository at this point in the history
  55. Configuration menu
    Copy the full SHA
    444e638 View commit details
    Browse the repository at this point in the history