Skip to content

Commit

Permalink
moar fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Krzmbrzl committed Jan 4, 2024
1 parent ca7c51b commit ece24d9
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions src/mumble/CoreAudio.mm
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ QString GetDeviceStringProperty(AudioObjectID device_id, AudioObjectPropertySele
device_id, &property_address, 0,
nullptr, &size, &property_value);
if (result != noErr) {
throw CoreAudioException(QString("Unable to get string property %1 of %2.").arg(property_selector, device_id));
throw CoreAudioException(QString("Unable to get string property %1 of %2.").arg(property_selector).arg(static_cast<int>(device_id)));
}

char buf[4096];
Expand All @@ -89,7 +89,7 @@ UInt32 GetDeviceUint32Property(AudioObjectID device_id, AudioObjectPropertySelec
UInt32 size = sizeof(property_value);
OSStatus result = AudioObjectGetPropertyData(device_id, &property_address, 0, nullptr, &size, &property_value);
if (result != noErr) {
throw CoreAudioException(QString("Unable to get uint32 property %1 of %2.").arg(property_selector, device_id));
throw CoreAudioException(QString("Unable to get uint32 property %1 of %2.").arg(property_selector).arg(static_cast<int>(device_id)));
}

return property_value;
Expand All @@ -103,7 +103,7 @@ UInt32 GetDevicePropertySize(AudioObjectID device_id, AudioObjectPropertySelecto
UInt32 size = 0;
OSStatus result = AudioObjectGetPropertyDataSize(device_id, &property_address, 0, nullptr, &size);
if (result != noErr) {
throw CoreAudioException(QString("Unable to get property size of %1 of %2.").arg(property_selector, device_id));
throw CoreAudioException(QString("Unable to get property size of %1 of %2.").arg(property_selector).arg(static_cast<int>(device_id)));
}
return size;
}
Expand Down Expand Up @@ -710,7 +710,7 @@ static void LogAUStreamDescription(AudioUnit au) {

qWarning("CoreAudioInput: BufferFrameSizeRange = (%.2f, %.2f)", range.mMinimum, range.mMaximum);

actualBufferLength = iMicLength;
actualBufferLength = static_cast<int>(iMicLength);
val = iMicLength;
propertyAddress.mSelector = kAudioDevicePropertyBufferFrameSize;
err = AudioObjectSetPropertyData(inputDevId, &propertyAddress, 0, nullptr, sizeof(UInt32), &val);
Expand Down Expand Up @@ -836,7 +836,7 @@ static void LogAUStreamDescription(AudioUnit au) {
buflist.mNumberBuffers = 1;
AudioBuffer *b = buflist.mBuffers;
b->mNumberChannels = iMicChannels;
b->mDataByteSize = iMicSampleSize * actualBufferLength;
b->mDataByteSize = static_cast<unsigned int>(iMicSampleSize * actualBufferLength);
b->mData = calloc(1, b->mDataByteSize);

// Start!
Expand Down Expand Up @@ -1064,7 +1064,7 @@ static void LogAUStreamDescription(AudioUnit au) {
if (err != noErr) {
qWarning("CoreAudioOutput: Unable to query for allowed buffer size ranges.");
} else {
setBufferSize(range.mMaximum);
setBufferSize(static_cast<unsigned int>(range.mMaximum));
qWarning("CoreAudioOutput: BufferFrameSizeRange = (%.2f, %.2f)", range.mMinimum, range.mMaximum);
}

Expand Down
2 changes: 1 addition & 1 deletion src/mumble/Overlay_macx.mm
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ static bool isInstallerNewer(QString path, NSUInteger curVer) {
goto out;
}

QXmlStreamReader reader(QByteArray::fromRawData(data, size));
QXmlStreamReader reader(QByteArray::fromRawData(data, static_cast<int>(size)));
while (! reader.atEnd()) {
QXmlStreamReader::TokenType tok = reader.readNext();
if (tok == QXmlStreamReader::StartElement) {
Expand Down
8 changes: 4 additions & 4 deletions src/mumble/PositionalAudioViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ void PositionalAudioViewer::update() {
m_ui->identity->setPlainText(posData.getPlayerIdentity());
}

void PositionalAudioViewer::updatePlayer(const PositionalData &data) {
const Position3D pos = data.getPlayerPos();
const Vector3D dir = data.getPlayerDir();
const Vector3D axis = data.getPlayerAxis();
void PositionalAudioViewer::updatePlayer(const PositionalData &posData) {
const Position3D pos = posData.getPlayerPos();
const Vector3D dir = posData.getPlayerDir();
const Vector3D axis = posData.getPlayerAxis();

m_ui->playerPosX->setValue(pos.x);
m_ui->playerPosY->setValue(pos.y);
Expand Down
4 changes: 2 additions & 2 deletions src/mumble/TextToSpeech_macx.mm
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ - (void)speechSynthesizer:(NSSpeechSynthesizer *)synthesizer didFinishSpeaking:(

void TextToSpeechPrivate::say(const QString &text) {
QByteArray byteArray = text.toUtf8();
NSString *message = [[NSString alloc] initWithBytes:byteArray.constData() length:byteArray.size() encoding:NSUTF8StringEncoding];
NSString *message = [[NSString alloc] initWithBytes:byteArray.constData() length:((NSUInteger) byteArray.size()) encoding:NSUTF8StringEncoding];

if (message == nil) {
return;
Expand All @@ -135,7 +135,7 @@ - (void)speechSynthesizer:(NSSpeechSynthesizer *)synthesizer didFinishSpeaking:(
void TextToSpeechPrivate::setVolume(int volume) {
// Check for setVolume: availability. It's only available on 10.5+.
if ([[m_synthesizerHelper synthesizer] respondsToSelector:@selector(setVolume:)]) {
[[m_synthesizerHelper synthesizer] setVolume:volume / 100.0];
[[m_synthesizerHelper synthesizer] setVolume:volume / 100.0f];
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/mumble/WASAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ static IMMDevice *openNamedOrDefaultDevice(const QString &name, EDataFlow dataFl
if (!name.isEmpty()) {
static std::vector<wchar_t> devname;
devname.resize(name.length() + 1);
int len = name.toWCharArray(devname);
int len = name.toWCharArray(devname.data());
devname[len] = 0;
hr = pEnumerator->GetDevice(devname.data(), &pDevice);
if (FAILED(hr)) {
Expand Down
2 changes: 1 addition & 1 deletion src/mumble/os_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ void os_init() {
}

bIsWin7 = IsWindows7OrGreater();
bIsVistaSP1 = isWindowsVistaSP1OrGreater();
bIsVistaSP1 = IsWindowsVistaSP1OrGreater();

#if _MSC_VER == 1800 && defined(_M_X64)
// Disable MSVC 2013's FMA-optimized math routines on Windows
Expand Down

0 comments on commit ece24d9

Please sign in to comment.