Is IWavePlayer.PlaybackStopped realiable? - naudio

I updated the NAudio assembly from 1.6 to 1.7. When seraching for information about the PlaybackStoppedEvent I came across this link: http://mark-dot-net.blogspot.com/2011/05/naudio-and-playbackstopped-problem.html
In the explanations there were question open.
So my question is, if there are any cases where PlayBackStopped event is not working realiable or if I can be sure that the playback is stopped when receiving the event?

NAudio will raise the PlaybackStopped event when playback stops. So yes it is reliable. If you find an instance where this doesn't happen please report a bug.

Related

Why does Debug Utils Extension requires swap chain device extension?

I want to use a new VK_EXT_debug_utils. I did it in a couple of projects already and it worked fine, but today I found that vkSetDebugUtilsObjectNameEXT throws a SIGSEGV. I spent a good amount of time trying to figure out what were differences between a new project and the old ones. With blind attempts, I figured out that in the new project I didn't specify VK_KHR_SWAPCHAIN_EXTENSION_NAME when created a device (because I don't need it) and that caused a crash somehow. I searched in a documentation but could not find any mention of this behavior. Did I miss something important?
Upd.: on Windows, the problem exists as well.
(Edited: Now fixed) I just saw this issue. I looked into it quickly by modifying one of Sascha Willems examples and I was able to reproduce this. It is a Vulkan loader bug, not a driver bug. I created a Vulkan loader bug here and resolved the issue.
If you build your own Vulkan loader, you can get a fix now. Otherwise, you'll have to wait for our next SDK release.
Sorry, but a huge thanks for catching this.

UI blocked when writing into textEdit

I've an application witch update execute commands on a database. I've a function witch execute that commands and in the in this function I display some messages to the user.
My problem is that the texts written into the textEdit are displayed at the end of the function work.
I've tried to use QThread but it does'nt resolve the problem
this->moveToThread(&threadText);
connect(&threadText, SIGNAL(started()), this, SLOT(writeTexte()));
threadText.start();
Does anyone have an idea how to proceed to write into textEdit and not block the UI ?
In Qt you never need threads in standard UI applications! That is because Qt uses something called event loops that process events smoothly without ever blocking. If you experience blocking, that is a sign that you have a bug somewhere in your code. For any beginner there are some pitfalls. The official documentation on the subject is quite good.
It is hard to tell what your exact bug is because there is littel code to look at. I suggest you post more of your code, especially the naive approach that did not work before you added threads to the mix.
On a side note, using threads in Qt is of course possible and has it's usages, however it can be un-intuitive. I have found this article to be a really good starting point to understand how threads is used best in Qt.

Why changes made with processor expert do not apply to my code?

I am facing a problem with Processor Expert in CodeWarrior.
I can't make changes made in peripheral apply to the generated code.
For example, in a code that uses a timer, if I disable the timer, regenerate the code, compile and load the code, it keeps working.
On the other hand, if I start a project from scratch, the same code does not work until I enable the peripherals (in this example, the timer).
So it looks like the first code generation works fine, but then any change made to the same peripheral has no effect.
I tried searching for a clue, and took a look at the Processor Expert user guide, with no luck so far. I appreciate any idea about what I could be doing wrong.
Thanks
I solved the problem a little while after posting this answer. I had started the project with the option Processor expert enabled. I started a new project, enabling Device initialization instead. Everithing works as expected now, whit the modifications done in Target CPU windows applying to mcuinit.c after generating the code.
This user guide helped me undestand the difference between Device Initialization and Processor Expert.

SAM-BA not responding with olimex sam7s256

I am using an Olimex sam7s256 board. I tried to get it up and running in linux (Ubuntu). I was able to successfully install GCC and binutils. I installed SAM-BA for linux from the atmel site. I was able to get the USB port for connection as specified in the SAM-BA manual (.dev/ttyUSB0).
But when I try to use the GUI and 'connect' there is no response.
I though that there is a connection failure, so when I presses the reset button in the board, I get a message "Failed to initialize FLASH accesses".
No matter how long I wait before pressing the reset button, I am not getting any SAM-BA window as given by other tutorials as below
can any one one help me out in this?
I did the 'tst' jumper set, reconnect the board for 10 s, disconnect and 'tst' jumper reset, reconnect before opening SAM-BA.
Any help will be greatly appreciated.
I am stuck.
It is the same for both SAM-BA 2.9 and 2.8.
By this point you are already connected. If you specified the at91sam7256-ek even if you arent using that board it will not put this gui up if it didnt talk to the chip/board. I recently went through this exercise with an olimex sam7s-256 header board. (with ubuntu linux). If I didnt specify the board type then the window came up but it wasnt really connected.
Notice how the code at 0x00200000 is valid instructions (most start with a 0xE and the vector table starts with a bunch of 0xEAs which are branches out of the vector table) that is ram it didnt make those up it read that from somewhere. Load a binary file into ram in the 0x00200000 range and the refresh the memory (assuming your binary is different from what is there) and see it change.
When ready/comfortable you can erase the flash and see in the memory window that the flash (0x0010000 or something like that) changes to all 0xFFFFFFFFs. Now remember it wont boot when you do that. With the board I have there is a jumper you move then power the board to get the built in bootloader re-loaded into the flash so that you can use sam-ba again, I am sure there is a way to do that with your board but read the users guide first.
Please do not close this person out for asking about using a software tool. There are countless numbers of how do I use my iphone simulator or why is my android simulator slower than my iphone simulator questions that dont get touched. this question is as relevant as any of the programming questions about how to use gcc or some web thing or how to start up my phone simulator or java vm. I wouldnt want to have to start a campaign to close all of the gcc or iphone tagged questions because they are not programming questions.
I think my question was misunderstood. The GUI window which I have posted is NOT what I get. I just posted it to say that I am not getting such a window at all. That window pops up only when I select 'no board'. When I select SAM7S256-EK there is no response. No window opens. As given in your blog sam7stuff.blogspot.com, I downloaded SAM-BA. The onlydifference as u have posted and in the response also id that u are using a 'h' board.
Right now I am using a custom made SAMBA alternative from this website,
http://claymore.engineer.gvsu.edu/~steriana/Software/
It is also a python based boot loader. It is command line though.
I would love to use the SAM-BA GUI. I am sure that the board is OK and samba is communicating with the board b'cos if I select any other board type other than ARM7S256-EK option it is giving me 'communication failure'.
If you have any suggestions please do let me know. Also many thanks for backing me up. I had some real good insights from this forum about embedded field and I felt it is a good place to discuss embedded programming doubts and never thought of 'programming' or 'non-programming' b'cos for SAM-BA user guide itself talks a lot about customizing the SAM-BA for a custom made board involving TCL scripts but I couldnot get hold of the concepts. So I thought someone would have had the same problem and would have found a TCL or C 'programming' solutions in this forum.
Thank you.

Record editing session in eclipse

Is there any plugin that let us record the editing session in ECLIPSE?
Say for example I want to learn from the best programmer how he codes in Eclipse etc, and we can replay how he does stuffs.
There are quite a few tools which will record video from a computer monitor, but, seriously? You're not going to learn anything about programming from watching someone type.
It's not recording, but the eclipse communication framework allows you to link two editors together for pair programming. This is likely a better solution (pair programming) to what you seek than simply watching someone else's nervous keyboard ticks without the ongoing dialogue anyway.
There is nothing native to Eclipse allowing to record, and then replay, a full Eclipse editing session.
Even Macro recording (Bug 8519 - keystroke macros recording and playing capability) is one of the most upvoted (131 votes)... and still not planed 8 years later (2002-2010 at the time of this writing)
The alternatives are few and not mature. Even the official Eclipse Monkey proposal has been withdrawn.
Right now, the best way to record a tutorial and transfer some knowledge on a topic is:
Eclipse Cheat Sheet (since Eclipse3.2).
You can register a session that way:
(source: eclipse.org)
And download some recorded session like this one about API tooling setup.