🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.lang.basic
Article #685

Sound question

#685
From: Blair Trosper
Date: Mon, 15 Nov 1999 00:00
32 lines
2108 bytes
I have been unable in my attempts to get QBasic to be able to sample sound
(specifically my CD player playing a cd) via &H20.  The script I am using:

From "The Revolutionary Guide To QBasic" by Wrox Press:
---
CONST screenmode = 12, xmax = 640
CONST BaseAddr = &H240
CONST commaddr = BaseAddr + &HC, DataAddr = BaseAddr + &HA
DEFINT A-Z
DIM byte(xmax)
SCREEN screenmode

DO
    OUT commaddr, &H20
    PRESET (i, byte(i))
    byte(i) = INP(DataAddr)
    PSET (i, byte(i))
    i = (i + 1) MOD xmax
LOOP
----

If I have winamp or any program open using WaveMapper, I get an error that
the sound card is already in use and that I cannot "play the sound."  If I
am using my CD player, nothing happens except a straight line.  The program
is supposed to be an oscilliscope of sorts.  My sound cards base address is
240 (CONST BaseAddr = &H240), but I have tried using 220 and a range of
other numbers.

Can anyone provide some insight into this problem, what might be wrong
and/or how I can get it to work?

Blair
Technical Details
Message-ID: <s31eupa8hsq38@corp.supernews.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f7646,bde123f6c7289d5,start
X-Google-Attributes: gidf7646,public
X-Google-Thread: 10ab99,bde123f6c7289d5,start
X-Google-Attributes: gid10ab99,public
X-Google-Thread: 10feaf,bde123f6c7289d5,start
X-Google-Attributes: gid10feaf,public
X-Google-Thread: 105859,bde123f6c7289d5,start
X-Google-Attributes: gid105859,public
X-Google-Thread: 112045,bde123f6c7289d5,start
X-Google-Attributes: gid112045,public
X-Google-Thread: 1017ee,bde123f6c7289d5,start
X-Google-Attributes: gid1017ee,public
From: "Blair Trosper" <REMOVEblairtREMOVE@tcacREMOVE.net>
Subject: Sound question
Date: 1999/11/15
Message-ID: <s31eupa8hsq38@corp.supernews.com>
X-Deja-AN: 549096652
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
X-Complaints-To: newsabuse@supernews.com
Organization: Posted via Supernews, http://www.supernews.com
X-MSMail-Priority: Normal
Newsgroups: alt.lang.basic,alt.lang.basic.compiler,fj.comp.lang.basic,fr.comp.lang.basic,japan.comp.lang.basic,relcom.comp.lang.basic