text
stringlengths 0
2.2M
|
---|
MainHostWindow* IOConfigurationWindow::getMainWindow() const
|
{
|
auto& desktop = Desktop::getInstance();
|
for (int i = desktop.getNumComponents(); --i >= 0;)
|
if (auto* mainWindow = dynamic_cast<MainHostWindow*> (desktop.getComponent(i)))
|
return mainWindow;
|
return nullptr;
|
}
|
GraphDocumentComponent* IOConfigurationWindow::getGraphEditor() const
|
{
|
if (auto* mainWindow = getMainWindow())
|
return mainWindow->graphHolder.get();
|
return nullptr;
|
}
|
AudioProcessorGraph* IOConfigurationWindow::getGraph() const
|
{
|
if (auto* graphEditor = getGraphEditor())
|
if (auto* panel = graphEditor->graph.get())
|
return &panel->graph;
|
return nullptr;
|
}
|
/*
|
* Copyright 2019 The Android Open Source Project
|
*
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
* you may not use this file except in compliance with the License.
|
* You may obtain a copy of the License at
|
*
|
* http://www.apache.org/licenses/LICENSE-2.0
|
*
|
* Unless required by applicable law or agreed to in writing, software
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* See the License for the specific language governing permissions and
|
* limitations under the License.
|
*/
|
#include "LinearResampler.h"
|
using namespace resampler;
|
LinearResampler::LinearResampler(const MultiChannelResampler::Builder &builder)
|
: MultiChannelResampler(builder) {
|
mPreviousFrame = std::make_unique<float[]>(getChannelCount());
|
mCurrentFrame = std::make_unique<float[]>(getChannelCount());
|
}
|
void LinearResampler::writeFrame(const float *frame) {
|
memcpy(mPreviousFrame.get(), mCurrentFrame.get(), sizeof(float) * getChannelCount());
|
memcpy(mCurrentFrame.get(), frame, sizeof(float) * getChannelCount());
|
}
|
void LinearResampler::readFrame(float *frame) {
|
float *previous = mPreviousFrame.get();
|
float *current = mCurrentFrame.get();
|
float phase = (float) getIntegerPhase() / mDenominator;
|
// iterate across samples in the frame
|
for (int channel = 0; channel < getChannelCount(); channel++) {
|
float f0 = *previous++;
|
float f1 = *current++;
|
*frame++ = f0 + (phase * (f1 - f0));
|
}
|
}
|
// bslstl_hashtable_test1.cpp -*-C++-*-
|
#include <bslstl_hashtable_test1.h>
|
#include <bsls_ident.h>
|
BSLS_IDENT("$Id$ $CSID$")
|
#include <bslstl_equalto.h> // for testing only
|
#include <bslstl_hash.h> // for testing only
|
#include <bslstl_hashtableiterator.h> // for testing only
|
#include <bslstl_iterator.h> // for testing only
|
// ----------------------------------------------------------------------------
|
// Copyright 2020 Bloomberg Finance L.P.
|
//
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
// you may not use this file except in compliance with the License.
|
// You may obtain a copy of the License at
|
//
|
// http://www.apache.org/licenses/LICENSE-2.0
|
//
|
// Unless required by applicable law or agreed to in writing, software
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// See the License for the specific language governing permissions and
|
// limitations under the License.
|
// ----------------------------- END-OF-FILE ----------------------------------
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.