[haiku-commits] BRANCH midar-github.master - src/add-ons/media/media-add-ons/mixer headers/libs/alm

  • From: midar-github.master <community@xxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 20 Nov 2012 01:30:43 +0100 (CET)

added 2 changesets to branch 'refs/remotes/midar-github/master'
old head: fd6989939bbaa8b86c1f529c10b660b616c17c7c
new head: 7b71b43d8d7c0230f738a1475120afe4f23fe615
overview: https://github.com/Midar/haiku/compare/fd69899...7b71b43

----------------------------------------------------------------------------

a0a8f89: Make ALM build with Clang.

7b71b43: Make mixer media add-on compile with Clang.

                                     [ Jonathan Schleifer <js@xxxxxxxxxxx> ]

----------------------------------------------------------------------------

2 files changed, 11 insertions(+), 5 deletions(-)
headers/libs/alm/ALMLayout.h                        |  2 +-
src/add-ons/media/media-add-ons/mixer/MixerCore.cpp | 14 ++++++++++----

############################################################################

Commit:      a0a8f899e4736228029c5d429dc627bf0fba2028
Author:      Jonathan Schleifer <js@xxxxxxxxxxx>
Date:        Tue Nov 20 00:00:30 2012 UTC

Make ALM build with Clang.

----------------------------------------------------------------------------

diff --git a/headers/libs/alm/ALMLayout.h b/headers/libs/alm/ALMLayout.h
index 98522b8..5ff4442 100644
--- a/headers/libs/alm/ALMLayout.h
+++ b/headers/libs/alm/ALMLayout.h
@@ -16,7 +16,7 @@
 
 class BView;
 class BLayoutItem;
-class Constraint;
+class LinearProgramming::Constraint;
 
 
 namespace BPrivate {

############################################################################

Commit:      7b71b43d8d7c0230f738a1475120afe4f23fe615
Author:      Jonathan Schleifer <js@xxxxxxxxxxx>
Date:        Tue Nov 20 00:09:31 2012 UTC

Make mixer media add-on compile with Clang.

----------------------------------------------------------------------------

diff --git a/src/add-ons/media/media-add-ons/mixer/MixerCore.cpp 
b/src/add-ons/media/media-add-ons/mixer/MixerCore.cpp
index 3ff2a8f..a9d7b5e 100644
--- a/src/add-ons/media/media-add-ons/mixer/MixerCore.cpp
+++ b/src/add-ons/media/media-add-ons/mixer/MixerCore.cpp
@@ -520,15 +520,18 @@ MixerCore::_MixThread()
        uint64 bufferIndex = 0;
 #endif
 
-       RtList<chan_info> inputChanInfos[MAX_CHANNEL_TYPES];
-       RtList<chan_info> mixChanInfos[fMixBufferChannelCount];
+       typedef RtList<chan_info> chan_info_list;
+       chan_info_list inputChanInfos[MAX_CHANNEL_TYPES];
+       chan_info_list *mixChanInfos = new 
chan_info_list[fMixBufferChannelCount];
                // TODO: this does not support changing output channel count
 
        bigtime_t eventTime = timeBase;
        int64 framePos = 0;
        for (;;) {
-               if (!LockFromMixThread())
+               if (!LockFromMixThread()) {
+                       delete[] mixChanInfos;
                        return;
+               }
                bigtime_t waitUntil = fTimeSource->RealTimeFor(eventTime, 0)
                        - latency - fDownstreamLatency;
                Unlock();
@@ -536,8 +539,10 @@ MixerCore::_MixThread()
                        waitUntil);
                if (rv == B_INTERRUPTED)
                        continue;
-               if (rv != B_TIMED_OUT && rv < B_OK)
+               if (rv != B_TIMED_OUT && rv < B_OK) {
+                       delete[] mixChanInfos;
                        return;
+               }
 
                if (!LockWithTimeout(10000)) {
                        ERROR("MixerCore: LockWithTimeout failed\n");
@@ -727,5 +732,6 @@ schedule_next_event:
 #if DEBUG
                bufferIndex++;
 #endif
+               delete[] mixChanInfos;
        }
 }


Other related posts: