It sounds like I managed to fix the bug. I contacted the EA support, here are the steps I did to correct the bug:
1. repair the game (Origin -> games library -> Star Wars BF2 -> click on the wheel (parameters) next to the play button -> repair
2. when the repair is complete, disable origin overlay while playing Star Wars (instead of clicking on repair, click on games property and unckeck the box in the new window).
3. change Windows compatibility to a older version (right click on the Star Wars shortcut on the desktop -> compatibility, I personally changed to Windows 7)
4. launch the game as administrator (same as above, but check the execute as administrator a little lower in the window)
I don't know which of these steps solved my issue, but it seems it works fine again, if it still doesn't work try to change a sound proprety (Sound -> right click on the headphone you are using -> advanced statistics -> swap the Canal 2, 16 bits, 44100Hz (DVD Quality) to Canal 2, 16 bits, 44100Hz (CD quality)).
If all of above didn't work, contact the EA support with the chat (not the report a bug because there won't be anyone respond to you, anyway it is indicated).
Special thanks to the person who took care of my problem. I find strange that nobody replied with a resolution ...
Anyway I hope this will help someone.