MegaHurtz wrote:180 degree is easy just invert :P
An inversion is not a 180 degree phase shift. By sheer coincidence of the maths, it just happens that you get the same result if, and only if, the waveform is symmetrical about its zero crossings (i.e. pure sine, square, etc. oscillator.)
For a complex waveform (i.e. the kind of thing you might want to sample), they are very, very rarely the same thing.
This is why flanger/phasing effects often have an invert button - because mixing in the "upside down" version of the waveform results in different cancellations, and so a different sound.
Still a useful thing for sure, but not a phase shift.
Moving the samples backward or forward in time is the right idea, and as said it's a case of dividing up the number of samples in each cycle of the waveform. SM's stock oscillators do exactly this when you use their 'phase' inputs (the wavetables that they use are just an advanced form of sample playback).
A simple "Interpolated delay" modules is enough for this, so long as you can work out the exact amount of samples for the delay time - so the tricky part of the problem is to know the frequency of the sound.
If the frequency is known (e.g. single notes on a instrument) that is easy - otherwise, there are some nice "pitch detection" modules around on the forum that will be worth playing with.
PS) Sorry MHz if I seemed a bit harsh - not meant that way, but the invert/phase-shift thing is my particular DSP pedantry fetish!