LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Other *NIX (https://www.linuxquestions.org/questions/other-%2Anix-55/)
-   -   How to play sound directly from input on USB sound card, a Sound Blaster X-Fi THX (https://www.linuxquestions.org/questions/other-%2Anix-55/how-to-play-sound-directly-from-input-on-usb-sound-card-a-sound-blaster-x-fi-thx-4175507425/)

JunctaJuvant 06-08-2014 02:53 PM

How to play sound directly from input on USB sound card, a Sound Blaster X-Fi THX
 
Hi,

I have a USB soundcard connected to a Macbook Air running OS X 10.9.3
The soundcard is a Creative Sound Blaster X-Fi THX, model number SB1240. It has a phono-in connection to which I have attached a gramophone record player and the line-out connection has a pair of active speakers attached.

The problem I am having is that I am unable to play the gramophone records directly, i.e. just by starting a record. Instead I need to use a separate program (Audacity) and select 'start monitoring' for the input. Then I suddenly hear the record player just fine, suggesting that both input and output are working.

In OS X I went into 'System Preferences > Sound' and I selected 'embedded gramophone' as the input source. When I play a gramophone, the input level indicates that sound-input is being received, so I believe this is configured correctly. Yet I still hear no sound.

A laptop running Windows 7 will just play my records straight away, without needing to use a separate program. Therefore I don't understand why I am unable to achieve the same thing in OS X. I must be missing something.

So any help on how to enable direct sound playback in OS X would be greatly appreciated! Thanks very much in advance! :)

Pearlseattle 06-09-2014 01:27 PM

Hi
Didn't understand:
1- are you on Linux or on MacOS and if you're on MacOS why do you post in the linux forum?
2- do you want to connect the phono-in connection of your soundblaster to the audio-out of your Macbook Air?

If #2 is correct then you might want to give "Jack" a try?
On MacOS: http://www.jackosx.com/
On Linux: http://www.jackaudio.org (currently down), package "jack-audio-connection-kit"
With that you could create a connection between the soundblaster-in and the speakers-out.

schneidz 06-09-2014 02:11 PM

os-x is unix (i beleive bsd-i kernel) so this subforum is apt.

are there lspci/lsmod commands for apple ? if so perhaps that will give us a starting point ?

JunctaJuvant 06-09-2014 04:16 PM

@Pearlseattle
I'm afraid #2 is not the case. The macbook is connected to the soundblaster via USB only. The speakers are connected to the line-out of the soundblaster and the gramophone is connected to the phono-in/line-in of the soundblaster. But thanks for trying to help!

@schneidz
I don't think so. But I do have a System Information utility and I'll include some relevant information from that below.
Under hardware is listed two audio entries and one USB device entry. As you can see, the soundblaster seems to be the default input and output device for audio.
Audio:
Code:

USB Sound Blaster HD:

  Default Input Device:        Yes
  Default Output Device:        Yes
  Default System Output Device:        Yes
  Input Channels:        2
  Manufacturer:        Creative Technology
  Output Channels:        2
  Current SampleRate:        48000
  Transport:        USB

Code:

USB Sound Blaster HD:

  Input Channels:        2
  Manufacturer:        Creative Technology
  Output Channels:        2
  Current SampleRate:        44100
  Transport:        USB

USB:
Code:

USB Sound Blaster HD:

  Product ID:        0x30d7
  Vendor ID:        0x041e  (Creative Labs)
  Version:        1.00
  Serial Number:        000001LG
  Speed:        Up to 480 Mb/sec
  Manufacturer:        Creative Technology
  Location ID:        0x1d114300 / 11
  Current Available (mA):        500
  Current Required (mA):        500

Does that help any? Thanks in advance!

schneidz 06-09-2014 04:39 PM

not sure... are there aplay and arecord programs ?

are there any devices in /dev/snd. perhaps you can hax something together by cat-ing the appropriate microfone device to the speakers ?

JunctaJuvant 06-09-2014 04:50 PM

Quote:

Originally Posted by schneidz (Post 5185293)
not sure... are there aplay and arecord programs ?

There is afplay, which seems to do the same thing as aplay. But I don't think there is an OS X version of arecord.

I thought about using /dev as well, but it appears there are no sound devices in /dev. I then googled a bit and discovered Apple has a different way of handling that. It seemed a bit complicated to me :/.

schneidz 06-09-2014 05:36 PM

apple has a habit of removing a lot of the under-the-hood stuff even though it makes things harder to script. a while back i made a program that used netcat to read/write /dev/dsp and sent speech thru the internet. at the time there was no netcat for apple so i gave up trying to port it for my friends.

does 'afplay -l' yield anyhting useful ?

i havent tested this out with a source but this seems promising:
Code:

[schneidz@hyper ~]$ amixer
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch pswitch-joined penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 65536
  Mono:
  Front Left: Playback 24273 [37%] [on]
  Front Right: Playback 24273 [37%] [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch cswitch-joined penum
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 65536
  Front Left: Capture 100 [0%] [off]
  Front Right: Capture 100 [0%] [off]
[schneidz@hyper ~]$  amixer set Capture 100 rec
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch cswitch-joined penum
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 65536
  Front Left: Capture 100 [0%] [on]
  Front Right: Capture 100 [0%] [on]
[schneidz@hyper ~]$  amixer set Capture 100 norec
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch cswitch-joined penum
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 65536
  Front Left: Capture 100 [0%] [off]
  Front Right: Capture 100 [0%] [off]

maybe apple renamed it afmixer ?

Pearlseattle 06-10-2014 01:36 PM

Well, I still insist on focusing on "Jack" :)
In Jack you could still create a virtual connection between the line-in of the SB and the line-out of the SB.

schneidz 06-10-2014 02:36 PM

maybe the card is not capable of full-duplex. most new cards are but just in case maybe you can boot up a linux live-usb and see if it is behaving the same ?

JunctaJuvant 06-10-2014 06:50 PM

@Pearlseattle
I'll have a look ;).
[update] Unfortunately I am having no luck with Jack after trying to configure it to monitor ports as the manual indicates. To be honest it also seems like a very complicated program for what I wish to achieve.

@schneidz
'afplay -l' is unfortunately not a recognized command. The commmand 'afplay -h' shows a list of available options, but there appears to be no 'list devices' option among them. And afmixer does not appear to exist either...

I do think the card is capable of full duplex, because I can both play and record at the same time, not only in Windows but also when using Audacity in OS X. But it might be interesting anyway to see what happens when I use a live-usb.

Thank you both for all the suggestions!

JunctaJuvant 06-14-2014 03:36 AM

I have now discovered that the option 'play sound through audio device' used to exist in OS 9, but was removed in OS X. Thus it appears that the problem I am having is simply due to a design choice by Apple and not related to the USB device not working correctly. I also discovered a very useful and easy to use little application called 'LineIn' which is designed to allow audio play-through in OS X. It seems to be actively maintained and is free to download and use.

So I would say this problem is solved. Thanks again for all the help! :)


All times are GMT -5. The time now is 04:20 AM.