This repository has been archived by the owner on Jan 4, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creating new SoundChip and moving Sfxr logic over to a special chip.
- Loading branch information
1 parent
b173829
commit dfd5f79
Showing
25 changed files
with
574 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// | ||
// Copyright (c) Jesse Freeman, Pixel Vision 8. All rights reserved. | ||
// | ||
// Licensed under the Microsoft Public License (MS-PL) except for a few | ||
// portions of the code. See LICENSE file in the project root for full | ||
// license information. Third-party libraries used by Pixel Vision 8 are | ||
// under their own licenses. Please refer to those libraries for details | ||
// on the license they use. | ||
// | ||
// Contributors | ||
// -------------------------------------------------------- | ||
// This is the official list of Pixel Vision 8 contributors: | ||
// | ||
// Jesse Freeman - @JesseFreeman | ||
// Christina-Antoinette Neofotistou @CastPixel | ||
// Christer Kaitila - @McFunkypants | ||
// Pedro Medeiros - @saint11 | ||
// Shawn Rakowski - @shwany | ||
// | ||
|
||
namespace PixelVision8.Engine.Chips | ||
{ | ||
|
||
public interface ISoundChip | ||
{ | ||
/// <summary> | ||
/// The total number of <see cref="Channels" /> available for playing | ||
/// back sounds. | ||
/// </summary> | ||
int totalChannels { get; set; } | ||
|
||
/// <summary> | ||
/// The total number of <see cref="Sounds" /> in the collection. | ||
/// </summary> | ||
int TotalSounds { get; set; } | ||
|
||
/// <summary> | ||
/// This method plays back a sound on a specific channel. The | ||
/// SoundChip has a limit of active <see cref="SfxrSoundChip.Channels" /> | ||
/// so playing a sound effect while another was is playing on the same | ||
/// <paramref name="channel" /> will cancel it out and replace with the | ||
/// new sound. | ||
/// </summary> | ||
/// <param name="index"> | ||
/// The ID of the sound in the SoundCollection. | ||
/// </param> | ||
/// <param name="channel"> | ||
/// The channel the sound should play back on. | ||
/// </param> | ||
void PlaySound(int index, int channelID = 0, float? frequency = null); | ||
|
||
bool IsChannelPlaying(int channelID); | ||
void StopSound(int channel); | ||
void Shutdown(); | ||
void AddSample(string name, byte[] bytes); | ||
|
||
/// <summary> | ||
/// Goes through the sounds and the sound bank and adds the sample byte data | ||
/// </summary> | ||
void RefreshSamples(); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// SfxrSynth | ||
// SfxrSynth | ||
// | ||
// Copyright 2010 Thomas Vian | ||
// Copyright 2013 Zeh Fernando | ||
|
Oops, something went wrong.