Xaudio2create Error

Share
Never mind Google: use the documentation: Returns SOK if successful, an error code otherwise. See XAudio2 Error Codes for descriptions of.
About SSF
This tutorial is to help you with SFF for Windows. From the early 2000s up to 2018, SSF had the crown as the #1 Saturn emulator. The crown was promptly taken away by uoYabause. However, just because SSF was #1 doesn't mean it's a good emulator. Emulation quality is okay. Saturn emulation, in general, has always had a bad reputation for emulating poorly.
Even though uoYabause is #1, it's still buggy and sometimes crashes. SSF may not run games as good, but it's a mature emulator that's far less prone to crash games. So we're not kicking SSF to the curb yet--it's still worth your time.
*If you would like to download SSF, I have it in my emulators page.
Installation
SSF is a standalone program so it does not have an install wizard. Installation is simple: just extract SSF from its zip file. Not sure how to extract zip files? Here's a video tutorial showing you how: how to unzip files on Windows.
IMPORTANT! SSF must be placed in a common folder on your computer. I recommend Documents, Downloads, or create a folder on your desktop. If you place SSF somewhere else on your main C drive, then you may be restricting it to read-only access. Doing so prevents SSF from saving anything.
To open SSF, double-click on
Q: I get a XAudio2Create error!
When you attempt to open SSF, you may receive the following error:
XAudio2Create() error.
File : ./XAudio2.cpp
Line : 219
Function : XAudio2_Initialize
So to resolve this error you need to install the full DirectX package. You can download it here: DirectX End-User Runtime Web Installer (284 KB). This installer promises to install all the legacy files that correct issues such as this.
Q: SSF opens so tiny!
SSF initially opens up small (as shown toward the right). Don't panic! SSF isn't broken. Just wait a few moments. SSF will eventually load into a full window.
Saturn BIOS
Most games require the Saturn BIOS in order to boot or emulate properly. SSF will fool you into thinking it doesn't need the BIOS, but really it does.
- Saturn BIOS bundle (2.18 MB) - The BIOS files for NA, UK, and JP.
- Saturn STV BIOS bundle (1.67 MB) - The STV BIOS files.
Setting up the BIOS
- It's best to extract the contents of the BIOS zip files into SSF's folder. It's easier this way.
- Click on Option(O) > Option(O), as shown below:
- You'll arrive at the Options window (shown below). In the “Saturn BIOS” box click the Browse button.
- The “Select Saturn BIOS file” window will pop up, which is this window . Click on “us_100.bin”, then click Open.
- Back in the Options window, in the “ST-V BIOS” box click the Browse button.
- The “Select STV BIOS file” window will pop up, which is this window . Click on “stv110.bin”, then click Open.
- Click OK. A window will pop up with “??????”. SSF is just telling you to close and re-open it for the configured BIOS to take effect. Go ahead and do so.
Setting up the keyboard or gamepad
- Click on Option(O) > Option(O), as shown below:
- You'll arrive in the Option window. Click the Controller tab, as shown below:
- To redefine the keys for player 1, click on Redefine where circled above for “Player 1:A”. Follow the prompt and press the keyboard keys or gamepad buttons you want to be assigned.
Booting CD games
Insert your Sega Saturn game into your CD-ROM, then open SSF. That's it! SSF will automatically boot up your game.
Booting ISOs (CD images)
Unfortunately, SSF does not support booting ISO files. However, there are a few things you can do to work around that:
- You can use a virtual CD-ROM program to trick SSF into thinking your ISO is a CD in your CD-ROM. I recommend Virtual CloneDrive for that (it's free!). Continue reading below for more information about Virtual CloneDrive and directions.
- Option 2 is to burn your ISO as a valid, physical Saturn game. Go here for directions.
Virtual CloneDrive & competitors
Virtual CloneDrive is the friendliest, easiest, and safest virtual CD-ROM program. Its drawback is that it only supports CD images in ISO and BIN format (see below for samples). Virtual CloneDrive does not support “ISO/MP3” or other ISO formats such as NRG, IMG, UIF, DAA, CDI, XBX, B51, BWI, etc.

Well, technically an ISO/MP3 would work. The game just wouldn't have audio when it's running in SSF. The game needs to be a single ISO or BIN/CUE because the audio tracks are packaged into the ISO file.
So what about other virtual CD-ROM programs? Is Virtual CloneDrive your only option? Well, yes and no. If you Google around on this topic, you’ll see people recommending Alcohol 52% Free Edition and Daemon Tools LITE for SSF. Those programs actually work very well. They even support every common ISO format. However, these programs are ridden with adware and malware! I do not recommend them.
If your Saturn game is in an ISO format not supported by Virtual CloneDrive, my recommendation is to try downloading your game from other ROM sites to search for it in ISO or BIN format. Avoid the risk of malware infection from using Alcohol 52% Free Edition or Daemon Tools LITE!
WinCDEmu and MagicDisk are other popular virtual CD-ROM programs. However, they’re not an option because they don’t work with SSF.
Booting CD images with Virtual CloneDrive
- Download and install Virtual CloneDrive.
- Next, we need to configure CloneDrive in SSF. Open SSF. Click on Option(O) > Option(O), as shown below:
- Look in the “CD Drive” box. Click the drop-down and choose ELBY CLONEDRIVE, as shown below:
- Click OK and close SSF. You'll get a weird “SSF?????” message - ignore it. I'm assuming that message is lost Japanese telling you to restart SSF.
- Because you installed CloneDrive, a CD icon should now be in the lower right (next to the time). You find it by clicking on the notch, as shown here . Right-click this icon , click Drive then Mount, as shown below:
- The “Virtual CloneDrive Drive” window will pop up. (Remember, Virtual CloneDrive only supports ISO and BIN files.)
- If your Saturn ISO is an ISO file:You'll see it in this window . Click on your ISO Saturn game, then click Open.
- If your Saturn ISO is a BIN file: Click CloneCD/DVD Images in the lower right, then click Other Images - as shown here . Click on your BIN Saturn game (not the CUE sheet), then click Open.
- Now open SSF and your Saturn game should automatically be booting up.
Q: I get a black screen when I boot games!
This is tricky. Consider the following:
- First of all, give SSF a minute or two before you decide that nothing is happening; maybe the game takes a while to boot.
- Did you setup the BIOS? You should - most games require it.
- See if the game you're trying to play even works with SSF - check the compatibility list.
- If this is a Saturn ISO that you downloaded, perhaps it's bad. Try this:
- I've been told that sometimes bad ISOs can be repaired. Try using CDmage's “Scan for Corruption” feature. Then use “Fix Corruption” to see if it finds anything.
- Try downloading the game from another site.
- There's a possibility that your game will run with an older version of SSF. Go to my emulators page and download the zip containing all SSF releases. Try running your game with them to see if it works.
- If nothing works, then your computer is not compatible with SSF. Sorry, SSF was not designed to run on every machine. SSF requires the following processors:
“SSF requires the processor to have the SSE2 instruction set, so a Pentium 4, Pentium M, Opteron, Athlon 64, Sempron (64bit), Turion 64 or better are necessary to run it.”
Q: I get a initializeDirect3D9 error!
Upon booting a game, you might receive this error:
IDirect3DDevice9::CreatePixelShader() error.
File : ./Direct3D9.cpp
Line : 1180
Function : Direct3D9::_initializeDirect3D9
Unlike other SSF errors, this one is actually fixable! You need to make a small edit to “ssf.ini”. So go into SSF's folder and look for . Double-click on it, and it should open up in Notepad. Scroll to the bottom and look for “WindowX” & “WindowY”:
As shown above, enter '50' for these attributes. Save and close. Open SSF and the error should be gone.
Full screen mode
Simply press Alt+Enter to bring SSF into full screen. Press Alt+Enter again to exit full screen.
Screen filters
SSF offers two filters for rendering the screen: Scanline and Bilinear Filtering. To enable them:
- Click on Option(O) > Option(O), as shown below:
- Click on the Screen tab, and you'll arrive here:
- Put a check in either “Scanline” or “Bilinear Filtering”, or both! Look below for samples of these filters. Click OK when you're done.
Save states
Save states is a feature that saves the exact spot you are in any game. Here's how it works:
Saving a state
- Go to File(F) > State Save(S).
- At the top of the screen, SSF will prompt you with “Select Save No. 0-9”:
SSF allows you to save up to 10 different save states. For now, press “0” to select the first slot. - That's it! Your state is now saved.
Loading a state
- To recall a save state go to File(F) > State Load(L).
- At the top of the screen, SSF will prompt you with “Select Save No. 0-9”. Press “0” to load a save from the first slot.
Capturing screen shots
Go to File(F) > Snapshot(C). SSF will dump the screen shot as a bitmap (BMP) into the “Snapshot” folder.
Improving performance
It can't be helped that SSF is a buggy emulator. But, yet there are a few things we can do to improve game performance and maybe even prevent/workaround crashes.
- Click on Option(O) > Option(O), as shown below:
- Click on the Screen tab. Remove the check from Auto Field Skip, and add checks to VSynch Wait (Window) and VSynch Wait (Fullscreen), as shown below:
- Click on the Program 4 tab. Add a check to Deinterlace (Very Slow), as shown below:
- Click on the EZ Setting tab. As shown here I circled two settings:
- Highest Compatibility - Some games such as “Spiritual Assassin Taromaru” and “Daytona: CE” run best with this setting.
- Full Compatibility - Set this option for the broadest game compatibility possible with SSF.
General troubleshooting
Sprites in SNK games missing
Character sprites in SNK games may not be appearing. Free download game pc pakai stick. To show them, go to Option(O) > Option(O) and under “Cartridge” select 1MBytes Ram Cartridge, as shown here .
Flickering in FMVs
If FMV sequences have an annoying flicker, go to Option(O) > Option(O) > Program 3 and put a check in Check Cycle Pattern, as shown here .
No sound
If sound is completely gone, well, first check for the obvious and make sure sound is working on your computer. Then try this: go to Option(O) > Option(O) > Program 3 and put a check in Memory Access Wait, as shown here .
Stuttering sound
If you find that sound is stuttering, go to Option(O) > Option(O) > Program 1 and put a check in Scanline Base Timing, as shown here .
Game-specific troubleshooting
You'll find all of the below options in Option(O) > Option(O). There are a lot of games in this list! Try a search in your browser (press Ctrl+F) for the game you want to find.
- Baroque (FMV issues): Enable “Check Sprite Priority”.
- Chaos Seed: Enable “Check Cycle Pattern”. Enable “VDP2 RAM Revision Access”.
- Dark Savior: Enable “Bus Wait” (fix for logo). Enable “VDP2 RAM Revision Access” (fix for save data screen).
- Daytona USA Circuit Edition: Enable “VDP2 RAM Revision Access”.
- Deep Fear, Daina-Airan, Mr. Bones, X-Men Vs. Street Fighter: Enable “Memory Access Wait”.
- Denpa Shounenteki Game, Astal: Enable “SH2 Cache”.
- Galjan: Enable “SH2 DMA Real Transfer”.
- Gokujou Parodius Da! Deluxe Pack (aka Fantastic Journey): Enable “Bus Wait”, Set “Bus Wait Clock” to 0.
- Grandia (FMV issues): Set “Dot Clock” on 3.7 or above. Set “SlaveSH2 Speed” to 90%, Set “EZ Setting” to Highest.
- dol Janshi Suchie-Pai II (fix for cutscenes): Enable “Check Cycle Pattern” and “VDP2 RAM Revision Access”.
- Lunar Silver Star Story (FMV issues): Enable “SCU DMA Delay Interrupt”.
- Marvel Super Heroes Vs. Street Fighter (fix for sound noise): Disable “Sound Thread”.
- Pro Mahjong Kiwame S, Megaman X3: Set “Dot Clock” to 3.7 or above. Set “1Block Clock” to a value as low as possible.
- Quovadis 2 (fix for FMVs): Set “Dot Clock” to 3.0 or above, and “EZ Setting” to “High”.
- Riglord Saga 2: Set “Dot Clock” to 3 or above.
- Ruri Iro no Yuki (fix for company logo among other stuff): Enable “Check Cycle Pattern”.
- Sol Divide: Set “Dot Clock” to 3.4 or above.
- Sonic Jam: Set “Dot Clock” to 2.7 or above. Enable “Check Cycle Pattern” (fix for 2P Mode in Sonic 2).
- Taito Chase HQ Plus SCI: Enable “CD Track/Index”.
- The Tower: Enable “VDP2 RAM Write Timing”.
- Toshinden URA (if FMVs skip): Set “1Block Clock” to 50. Disable “Check SlaveSH2 Idle Loop”. Enable “Bus Wait”. Set “Bus Wait Clock” to 1. Enable “Enable Instruction Cache”.
- Virtua Fighter 2: Enable “VDP2 RAM Revision Access” (fix for key config screen). Enable “Memory Access Wait”.
- Whizz, Thunder Hawk II: Enable “Bus Wait”.
- World Heroes Perfect, Castlevania Symphony of the Night (fix for data select screen), Macross Do You Remember Love: Enable “VDP2 RAM Revision Access”.
Finding Saturn games (ISOs)
In my links page, I have some good links to sites where you can download Saturn ISOs. If you want to try to find more sites than what's in my collection of links, just Google around. For example, if you want to download Shining Force III just Google “download shining force iii saturn”.
Q: SSF crashes on start!
This can be tricky because this could be caused by many things.
- In most cases, this happens simply because you don't have the latest version of DirectX installed. You can download it here: DirectX End-User Runtime Web Installer (284 KB).
- See if the game you're trying to play even works with SSF - check the compatibility list.
Q: SSF crashes mid game and gives CPK error!
At certain points in a game, SSF may suddenly crash and give you this error: “CPK error 0x00000301”. Particularly, this happens in Dragon Force 2 when you select a kingdom. Unfortunately there is no fix for this problem. You can try an older version of SSF to see if the error doesn't occur, but more than likely the game you're playing is not compatible with SSF.
Q: I keep getting disc read errors!
SSF might repeatedly prompt you with disc read errors - even if you're using an ISO with virtual CD-ROM software. There are a few things you can try:
- Attempt #1 - Play with the compatibility settings. You find it by going to Option > Option > EZ Setting tab. Maybe try the lowest compatibility setting just to get past the point of the game giving you disc read errors. Then set it back to Full Compatibility until you get disc read errors again. Does this not resolve it? Try the next attempt..
- Attempt #2 - Try different versions of SSF. The last time I updated this tutorial, the latest version of SSF was 0.12 beta R4. Avid users of SSF have told me that 0.12 beta R3 is actually more stable than R4. Using R3 seems to be the least prone to give you disc read errors. Does this not resolve it? Try the next attempt..
- Attempt #3 - Lastly, I would question your ISO. Maybe it's partially corrupt or in a format that isn't so friendly. So try a different ISO; download the game from somewhere else.
Q: Audio is out of sync!
In some games, you'll encounter out of sync audio, which is very annoying. Games such as “Keio 2”, “Twinkle Star Sprites”, and “Spiritual Assassin Taromaru” are affected by this bug. To resolve this use SSF version 0.11 or older. Go to my emulators page to download older releases of SSF.
Q: SSF isn't saving anything!
If you're using SSF for the first time and you're finding that you have all these problems:
- Save states aren't working. You save a state, then when you try to reload it nothing happens.
- In an RPG when you save your game at a save point and close/re-open SSF, you find that the save is lost.
- Emulator configurations that you changed aren't saved. When you close/re-open SSF, you have to make those configuration changes again.
Then your problem is that you currently have SSF in a read-only location on your computer. You must move SSF to a more common location such as Documents, Downloads, or a folder on your desktop.
Burning Saturn games from ISO
These directions are for burning an ISO or BIN/CUE archive to a CD-R. Note that in order to play CD-R copies on the Sega Saturn system, you need to use the boot trick.
- Download & install ImgBurn (it's free). You can download ImgBurn from the ImgBurn homepage.
*If you have an anti-virus such as AVG, it may flag ImgBurn for containing adware . Don't panic - it does not contain adware! This warning is false. All that ImgBurn does is show you ads during the install wizard (which is why AVG falsely flags it). ImgBurn is 100% safe. - Upon opening ImgBurn, click Write image file to disc, as shown here .
- Under “Source” click the folder icon, as shown here . Navigate your computer to where your Saturn ISO or BIN/CUE resides. Select it and click Open, as shown here
- Take a look at this picture . Insert the CD-R disc. Upon insertion, you'll see information appear (where indicated in the picture at “1”). Next, make sure your CD drive is selected (it should do it automatically).
- Click the icon to burn. Depending on the speed of your CD drive, your game could take maybe 2-10 minutes to finish burning. That's it! Enjoy your fresh copy of a Saturn game.
Copying/Backing up Saturn games
These directions are for duplicating a real Saturn game or a CD-R copy.
- Download & install ImgBurn (it's free). You can download ImgBurn from the ImgBurn homepage.
- First, you need to rip your Saturn game to an ISO. Open ImgBurn. Click Create image file from disc, as shown here .
- Make sure the proper source drive is set in “Source”, then click the Read icon - as shown here .
- Ripping your Saturn game will take maybe 20-30 minutes. By default, ImgBurn will toss the BIN file (the ISO) into Documents. Now that you have a BIN/CUE of your game you can follow the burning directions right above. Scroll up to Burning Saturn games from ISO.
Thank you for reading my tutorial! If you found it useful, you're welcome to return the gesture by buying something from my Amazon store. If have questions you're welcome to email me or message me on social media.
I have written a game that uses XAudio2 (via the SharpDX wrapper for C#). For myself and 99% of my players, everything is working fine. But occasionally I get automated error reports from players which indicate that my call to IXAudio2::CreateMasteringVoice is returning XAUDIO2_E_INVALID_CALL.
Here's my C#/SharpDX code:
(If you're unfamiliar with SharpDX, the important thing to point out is that SharpDX automatically checks for error codes returned from DX functions and throws an exception if an error is returned. My application then catches that exception at a higher level (not shown) and reports it to me.)
I think it's pretty unlikely that SharpDX is to blame here, because it's a very thin wrapper around the native DirectX APIs and I couldn't find any obvious issues in its source code.
The logging statement above has also verified that the XAudio2 device is being created successfully. (XAudio2Create is returning success and outputting a non-NULL pointer.)
The docs for CreateMasteringVoice mention two reasons why it might return XAUDIO2_E_INVALID_CALL:
XAudio2 only allows one mastering voice to exist at once. If you attempt to create more than one voice, XAUDIO2_E_INVALID_CALL is returned.
and
It is invalid to call CreateMasteringVoice from within a callback (that is, IXAudio2EngineCallback or IXAudio2VoiceCallback). If you call CreateMasteringVoice within a callback, it returns XAUDIO2_E_INVALID_CALL.
I am definitely *not* doing either of these things, and so I'm at a loss as to why it would be returning XAUDIO2_E_INVALID_CALL.
I did find an old thread from someone who has the same issue, but there was no resolution to that. In that thread, someone asks,
Are you sure those machines have the same DirectX version installed?
To which my own answer would be 'no'. My game's installer should automatically install the required DirectX components, but it's possible that has failed for some of my players, or that they are running the executable without running the installer. Is there any way to verify, within my application itself, that XAudio2 is installed on their machine? (Besides, if XAudio2 wasn't installed, wouldn't creating the XAudio2 device fail before it even gets to creating the mastering voice?)
If anyone has any clues on why this might be happening, or how to debug it, I'd greatly appreciate it. Thanks!
FWIW, I've never gotten an error report from players on Windows 10 computers; only Windows 7, 8, and 8.1. That's the only commonality I could find in the error reports.