RSound and libportaudio-2.dll

Hello,
I'm trying to work with sounds and I installed the RSound package.
When I try to run:

(require rsound)
(play ding)

the result is an error:

I found the libportaudio-2.dll on dll-files.com. I tried to copy it in:
C:\Program Files\Racket\lib\
but it didn't work.

What can I do?

Matteo

The paths I'm seeing here suggest that this is Windows. You should not have to install any dll's yourself on Windows. Let me take a quick look to see where that should have been installed....

Ooh, here's a question. Is this a 32-bit or 64-bit machine / racket install? Can you run this program and tell me what it produces?

#lang racket/base

(list
 (system-type 'arch)
 (system-type 'word))

I'm working on windows 10 and intel i3 CPU.

#lang racket/base

(list
 (system-type 'arch)
 (system-type 'word))
=> '(x86_64 64)

Okay, that's good. Next up, can you check whether the "portaudio-x86_64-win32" package got installed? The easiest way to do this is probably to open the "File > Package Manager" menu, click on "Currently Installed", and type "portaudio". Here's what I see (I'm running this on a mac):

If the answer is yes

...

Hmm... I just went and poked around a bit, and now I'm wishing I had a windows platform to test on. I see that the installed dll is called "libportaudio.dll", not "libportaudio-2.dll". On the other hand, it looks to me like the code in the portaudio library should try the version-less name as well. Here's the beginning of that file:

#lang racket/base

;; this file provides an FFI wrapper around the existing portaudio
;; API.  It does not attempt to guarantee safety, and it's definitely
;; possible to crash DrRacket by calling these functions improperly.
;; there are a few utility functions at the bottom that are used in
;; order to manage things a bit.

(require setup/collection-search
         ffi/unsafe
         racket/runtime-path
         racket/match
         (for-syntax racket/base syntax/parse)
         (only-in '#%foreign ffi-callback))

(provide (all-defined-out))


(define linux-err-msg
  "Note: on Linux/unix, you need to install the libportaudio library\
 yourself. Underlying error message: ~a")

(define not-false? (λ (x) x))
(define portaudio-version-strings '("2" "2.0.0" #f))
(define libportaudio
  (with-handlers
      ([exn:fail?
        (lambda (exn)
          (cond
            [(equal? (system-type) 'unix)
             (error 'rsound
                    linux-err-msg
                    (exn-message exn))]
            [else
             (raise exn)]))])
    (ffi-lib "libportaudio"
             portaudio-version-strings)))

... and it looks to me like this should run as standalone code. Can you confirm for me that this signals the same error? If so, try removing the "2" and the "2.0.0" from the list above, and see what happens.

The "portaudio-x86_64-win32" package is installed:

The same error is signaled:

Matteo

Wait, I'm confused. It looks like you added an empty string to the list, rather than removing the two elements I suggested. Am I missing something here?

I'm sorry John, I thought it was the same.

I tried to remove and reinstall RSound and portaudio. An error came out:

Matteo