Audio problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Audio problem

Bernat Romagosa
Hi guys,

I've detected audio isn't looping properly in Amber, but it used to. I've been searching around and finally found this post:


So it seems it's something that should be solved in the Amber file server, but I didn't exactly figure out what, because the suggested solution in this SO thread is just to use Express.

Any ideas on how to fix this?

--
Bernat Romagosa.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Audio problem

Bernat Romagosa
So I've tried to edit FileServer's code in order for it to return the proper 206 response when the requested file is a binary, but I am really lost, I don't know where amber is getting the compiled files from. 

I've tried modifying the amber sources in my local bower-components folder, then recompiling with amberc and it didn't work.

Then I tried to modify the shared amber sources in /usr/local/lib/node_modules/amber-cli/ and it didn't work neither.

What's the proper procedure to modify this sources and compile them?

Thanks!


2014-05-13 17:27 GMT+02:00 Bernat Romagosa <[hidden email]>:
Hi guys,

I've detected audio isn't looping properly in Amber, but it used to. I've been searching around and finally found this post:


So it seems it's something that should be solved in the Amber file server, but I didn't exactly figure out what, because the suggested solution in this SO thread is just to use Express.

Any ideas on how to fix this?

--
Bernat Romagosa.



--
Bernat Romagosa.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Audio problem

Manfred Kröhnert
Hello Bernat,

sorry for taking so long to respond.


On Thu, May 15, 2014 at 4:30 PM, Bernat Romagosa <[hidden email]> wrote:
So I've tried to edit FileServer's code in order for it to return the proper 206 response when the requested file is a binary, but I am really lost, I don't know where amber is getting the compiled files from. 

I've tried modifying the amber sources in my local bower-components folder, then recompiling with amberc and it didn't work.

The files in bower_components should never be edited manually.
 
Then I tried to modify the shared amber sources in /usr/local/lib/node_modules/amber-cli/ and it didn't work neither

Node modules shouldn't be changed manually, too :-)
 
What's the proper procedure to modify this sources and compile them?

The command 'amber serve' comes with the amber-cli package as you already now.
There have been some recent reorganizations where amber-cli was put back into the main amber repo where it is now found in 'external/amber-cli'.
However, it is still considered a separate npm package.

If you want to develop amber-cli you should:

1. update to latest git master of amber
2. run 'bower install' in amber/external/amber-cli
3. run 'npm install' in amber/external/amber-cli
4. run 'npm install -g grunt-cli'
5. change to the directory amber/external/amber-cli and start 'amber serve'
6. open your browser on http://localhost:4000/index.html
7. edit the FileServer class and commit the package
8. execute the command 'grunt' in the terminal
9. run the new amber-cli command with 'node ./support/amber-cli.js serve'

If you don't want to use the Amber IDE (which you should not) you can leave out steps 2, 5, 6, 7 and edit the file 'src/AmberCli.st' directly.
All other steps remain the same.

Best,
Manfred

 
Thanks!


2014-05-13 17:27 GMT+02:00 Bernat Romagosa <[hidden email]>:

Hi guys,

I've detected audio isn't looping properly in Amber, but it used to. I've been searching around and finally found this post:


So it seems it's something that should be solved in the Amber file server, but I didn't exactly figure out what, because the suggested solution in this SO thread is just to use Express.

Any ideas on how to fix this?

--
Bernat Romagosa.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Audio problem

Herby Vojčík
In reply to this post by Bernat Romagosa


Manfred Kröhnert <[hidden email]>napísal/a:

If you want to develop amber-cli you should:

1. update to latest git master of amber
2. run 'bower install' in amber/external/amber-cli
3. run 'npm install' in amber/external/amber-cli
4. run 'npm install -g grunt-cli'
5. change to the directory amber/external/amber-cli and start 'amber serve'
6. open your browser on http://localhost:4000/index.html
7. edit the FileServer class and commit the package
8. execute the command 'grunt' in the terminal
9. run the new amber-cli command with 'node ./support/amber-cli.js serve'

That's one scary list ;-)

I'll try to explain a bit to dispel the fear:

2 and 3 are just stock commands to load the local dependencies. Server-side ones (which are needed for developer) are from npm, the repository for node packages. Ones used in a browser are from bower, the repository for browser packages.

If you ask "what browser, I want to change the cli tool", that is very good question. The answer is, the IDE for developing amber-cli is in the browser. IOW, if you eschew the IDE, there is no point for `bower install`.

Of course, both commands should be run from the root directory of the project (where the manifest files package.json and bower.json are), and in case of amber-cli it is `external/amber-cli` directory in ambet repo.

4 is one-time task. It install the cli command 'grunt' globally. So if you already have one, you don't need to reinstall it again.

5 and 6 are just one of the means how to get working IDE. You must have a servet that serves the project directory (5) and load the index.html from it (6), in which the IDE starts.

I personally do `amber serve` in the root directory of amber repo itself and when I want to develop amber-cli, I load http://localhost:4000/external/amber-cli/. Works perfectly (and I can have just one run configuration in my WebStorm, for the root).

8 is not needed for stock projects. But in case of amber-cli, it is not enough to change the class in IDE and commit it (which suffices for browser apps). Here, amber classes, amber cli classes and some glue code must be combined to actually produce a node.js executable, that can be run from cli. This is what 'grunt' does for you in amber-cli directory, as configured in Gruntfile.js.

9 may be pretty confusing when compared with 5. Well, if you run `amber foo`, you run the stable amber-cli, the one you installed from npm by `npm install -g amber-cli`. This stable, global one is used in 5. If you run `node ./support/amber-cli.js bar`, you are directly running the product of step 8. You choose which one you want to run.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Audio problem

Tom Rake


On Saturday, May 17, 2014 7:49:25 AM UTC-4, Herby wrote:

Manfred Kröhnert <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="HGTq1uhKI0EJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">mkroeh...@...>napísal/a:

If you want to develop amber-cli you should:

1. update to latest git master of amber
2. run 'bower install' in amber/external/amber-cli
3. run 'npm install' in amber/external/amber-cli
4. run 'npm install -g grunt-cli'
5. change to the directory amber/external/amber-cli and start 'amber serve'
6. open your browser on <a href="http://localhost:4000/index.html" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Flocalhost%3A4000%2Findex.html\46sa\75D\46sntz\0751\46usg\75AFQjCNGMUaHpMw5G7Oru40YR2dlcpcpOCQ';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Flocalhost%3A4000%2Findex.html\46sa\75D\46sntz\0751\46usg\75AFQjCNGMUaHpMw5G7Oru40YR2dlcpcpOCQ';return true;">http://localhost:4000/index.html
7. edit the FileServer class and commit the package
8. execute the command 'grunt' in the terminal
9. run the new amber-cli command with 'node ./support/amber-cli.js serve'

That's one scary list ;-)

I'll try to explain a bit to dispel the fear:

2 and 3 are just stock commands to load the local dependencies. Server-side ones (which are needed for developer) are from npm, the repository for node packages. Ones used in a browser are from bower, the repository for browser packages.

If you ask "what browser, I want to change the cli tool", that is very good question. The answer is, the IDE for developing amber-cli is in the browser. IOW, if you eschew the IDE, there is no point for `bower install`.

Of course, both commands should be run from the root directory of the project (where the manifest files package.json and bower.json are), and in case of amber-cli it is `external/amber-cli` directory in ambet repo.

4 is one-time task. It install the cli command 'grunt' globally. So if you already have one, you don't need to reinstall it again.

5 and 6 are just one of the means how to get working IDE. You must have a servet that serves the project directory (5) and load the index.html from it (6), in which the IDE starts.

I personally do `amber serve` in the root directory of amber repo itself and when I want to develop amber-cli, I load <a href="http://localhost:4000/external/amber-cli/" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Flocalhost%3A4000%2Fexternal%2Famber-cli%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNEaOAPCzB68lWl3uwmnm55L7YdSyA';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Flocalhost%3A4000%2Fexternal%2Famber-cli%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNEaOAPCzB68lWl3uwmnm55L7YdSyA';return true;">http://localhost:4000/external/amber-cli/. Works perfectly (and I can have just one run configuration in my WebStorm, for the root).

8 is not needed for stock projects. But in case of amber-cli, it is not enough to change the class in IDE and commit it (which suffices for browser apps). Here, amber classes, amber cli classes and some glue code must be combined to actually produce a node.js executable, that can be run from cli. This is what 'grunt' does for you in amber-cli directory, as configured in Gruntfile.js.

9 may be pretty confusing when compared with 5. Well, if you run `amber foo`, you run the stable amber-cli, the one you installed from npm by `npm install -g amber-cli`. This stable, global one is used in 5. If you run `node ./support/amber-cli.js bar`, you are directly running the product of step 8. You choose which one you want to run.


In addition you may need to terminate the server started in 5) before starting a new one in 9) because they both use port 4000 

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.