Git Product home page Git Product logo

Comments (6)

souravdatta avatar souravdatta commented on July 26, 2024 1

I had the same problem and resolved it by changing the frame rate to 44100 from a higher one in Sound settings of the Windows machine. Right click on the sound icon in taskbar and navigate to the advanced properties of the playback device. If the frame rate is selected as something other than 44100, then change it back and restart dr. racket or re run the program.

from rsound.

benoid avatar benoid commented on July 26, 2024

@souravdatta. I can confirm your solution works.

It was also brought to my attention by @Sivat394 yesterday that the (diagnose-sound-playing) procedure specifically produces output requesting the user to change the Windows audio frame rate to 44100. However, I don't currently have access to a Windows machine to check the exact output.

I'm not going to close this issue yet, because I'd like to try to find a solution that doesn't require users to modify any system configurations to run the library. If a fix is not found quickly, it might be worth adding a section to the scribble docs regarding the workaround until the issue is resolved.

Thank you both for your input.

from rsound.

benoid avatar benoid commented on July 26, 2024

The output referenced by the previous comment is located at line 62 of https://github.com/jbclements/RSound/blob/master/rsound/diagnose.rkt.

(define followup-message
  #<<|
If playback at 44100.0 failed and playback at another sample rate
succeeded using Windows 7, you probably need to manually set the 
sample rate of that playback device to 44100 Hz, by right-clicking 
on the volume icon and then digging through menus (properties, advanced).

|
  )

from rsound.

jbclements avatar jbclements commented on July 26, 2024

Good news! Well, mostly good news. I've added code to allow users to select a default sample rate (specifically, to choose between 44.1KHz and 48KHz, though it wouldn't be hard to add others to this list). This will allow you to use RSound on Windows systems that have 48K as the default, and is especially useful for those where 48KHz is the only choice.

This solution does have some drawbacks. Specifically, some of the built-in samples are still 44.1KHz, so playing them might cause error messages (the alternative is to translate them on the fly, which might make sense but might not.)

I need to run the tests and publish this code. If someone responds to this message, I can probably get to this today or tomorrow.

from rsound.

benoid avatar benoid commented on July 26, 2024

I just tested setting the default-sample-rate on a Windows machine at one of my university's labs. The result was essentially what you predicted. The 44.1KHz samples do produce error messages even when the RSound default sample rate is set to be the same as the operating system's. Specifically, piano-tone and ding are broken, but synth-note and signal-play begin to work.

from rsound.

benoid avatar benoid commented on July 26, 2024

I think this issue can be closed once those changes are published, but maybe we could open some relevant issues under "enhancement" or "feature" labels For example:

Are there any other 44.1KHz samples? Would it be realistic to synthesize some of these sounds rather than attempt to translate them at run time? That would also overcome the limitation of the finite-length of the samples.

Also, is there any way for RSound to auto-detect the sample rate that the OS is using? I think this would be ideal for anyone who wants to use RSound in applications which are intended to be distributed across multiple platforms.

I can look into either of these, as long as you think they are appropriate.

from rsound.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.