Skip to content

Instantly share code, notes, and snippets.

View pjohnst5's full-sized avatar

Paul Johnston pjohnst5

View GitHub Profile
@pjohnst5
pjohnst5 / CMakeLists.txt
Last active April 18, 2024 01:57
C++ QT 6.7.0 Macos arm64 Audio Recording busted (audiorecorder example)
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
cmake_minimum_required(VERSION 3.16)
project(audiorecorder LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
@pjohnst5
pjohnst5 / mictest.py
Created April 17, 2024 19:33
This is to reproduce a bug where audio recording (from microhpone) does not work on PyQT 6.7.0, MacOS, arm64 chip, Python 3.9
# When running this with PySide 6.4.2 on Mac ARM64 chip Python 3.9, recording audio works
# When upgrading PySide to 6.7.0 (keeping everything else constant), recording fails
import sys
from PySide6.QtWidgets import (QApplication, QMainWindow, QPushButton)
from PySide6.QtMultimedia import (QMediaCaptureSession, QAudioInput, QMediaRecorder)
class MicTest(QMainWindow):
def __init__(self):
super().__init__()
@pjohnst5
pjohnst5 / test.py
Created December 29, 2021 04:23
Test gist
def hello_world():
print('hello world')