![a6c8d8357c52fc0bccfbd4bd63c1900e.png](https://i-blog.csdnimg.cn/blog_migrate/05f496e4829d5d7d2666ce8723e252d1.jpeg)
1.播放MP3功能用的是Window里面的media功能,废话不多说看代码吧.
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
/**
*
*/
class SPEECHENGLISH_API CPlaySound
{
public:
CPlaySound();
static TSharedPtr<CPlaySound>Get();
void CPlayRecordSound(const FString SoundName);
//void Test();
private:
static TSharedPtr<CPlaySound>ExecutePlaySoundInstance;
static TSharedRef<CPlaySound>Create();
static void Initialize();
FString SoundPath;
};
// Fill out your copyright notice in the Description page of Project Settings.
#include "../SpeechEnglish/Public/PlaySound/CPlaySound.h"
#in