Skip to content

Commit dadb9be

Browse files
bakablahpeircej
authored andcommitted
Updated Channel field to the correct valType: int (#2425)
Wrong valType caused ExpBuilder to generate wrong attribute for AdvAudioCapture
1 parent a58ade0 commit dadb9be

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

psychopy/experiment/components/microphone/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def __init__(self, exp, parentName, name='mic_1',
5656

5757
msg = _translate("Enter a channel number. Default value is 0. If unsure, run 'sound.backend.get_input_devices()' to locate the system's selected device/channel.")
5858

59-
self.params['channel'] = Param(channel, valType='str', hint=msg, label=_localized['channel'])
59+
self.params['channel'] = Param(channel, valType='int', hint=msg, label=_localized['channel'])
6060
def writeStartCode(self, buff):
6161
# filename should have date_time, so filename_wav should be unique
6262
buff.writeIndented("wavDirName = filename + '_wav'\n")

psychopy/tests/test_app/test_builder/componsTemplate.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2362,7 +2362,7 @@ MicrophoneComponent.channel.readOnly:False
23622362
MicrophoneComponent.channel.staticUpdater:None
23632363
MicrophoneComponent.channel.updates:None
23642364
MicrophoneComponent.channel.val:0
2365-
MicrophoneComponent.channel.valType:str
2365+
MicrophoneComponent.channel.valType:int
23662366
MicrophoneComponent.disabled.default:False
23672367
MicrophoneComponent.disabled.allowedTypes:[]
23682368
MicrophoneComponent.disabled.allowedUpdates:None

0 commit comments

Comments
 (0)