• Post Reply Bookmark Topic Watch Topic
  • New Topic

Sound API

 
Bod McLeon
Ranch Hand
Posts: 65
Eclipse IDE IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have got code to run .wav's and I think .AAC's. Here it is:

When I runt it I get this error message:

Anyone know why? (link to video: Youtube: Sound API)
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Looks like you are trying to play a big file.

A simple google for the error led me to
http://stackoverflow.com/questions/9470148/how-do-you-play-a-long-audioclip
The accepted answer might solve your problem
 
Bod McLeon
Ranch Hand
Posts: 65
Eclipse IDE IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maneesh Godbole wrote:A simple google for the error led me to
http://stackoverflow.com/questions/9470148/how-do-you-play-a-long-audioclip
The accepted answer might solve your problem


Thanks for the help. But where and how do I add it into my code because their code is different to mine so I don't know where to add the bigClip thing.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BigClip is not any jar/library.
It is a custom implementation of the Clip interface by Andrew Thompson
The answer links to the source code of BigClip

How to use it is already shown in the answer.
 
Bod McLeon
Ranch Hand
Posts: 65
Eclipse IDE IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maneesh Godbole wrote:BigClip is not any jar/library.
It is a custom implementation of the Clip interface by Andrew Thompson
The answer links to the source code of BigClip

How to use it is already shown in the answer.


Im so sorry but I literally am so confused. I copied the entire piece of code with BigClip in it and I am still getting the Too Large Buffer message. If I am being really irritating I don't mean it! It's just the way I am.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please show us what you have tried
 
Bod McLeon
Ranch Hand
Posts: 65
Eclipse IDE IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have tried this:


This:

This:
http://stackoverflow.com/questions/9470148/how-do-you-play-a-long-audioclip
(second post/ first answer)

And lastly I have tried shrinking the file size.
None of that worked.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try this?


after substitution to use your audio file?

BTW how big is your file? Because
BigClip will load sound files to the maximum memory the JVM will allow before OutOfMemoryError.
 
Bod McLeon
Ranch Hand
Posts: 65
Eclipse IDE IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My thing says it is 23.18M. No idea what that is. But it is what it is

 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Try
 
Bod McLeon
Ranch Hand
Posts: 65
Eclipse IDE IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I just tried this. Got lost of errors. I then fixed them and when I ran it I got the same old same old buffer too large message.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!